11/3/2014 8:23 AM | |
Joined: 6/3/2014 Last visit: 1/11/2023 Posts: 10 Rating: (0) |
Hello all, Is it possible to convert a hex value to floating point in step_7 400 V5.4??
----------------------- New subject after splitting from Converting Floating values to Decimals. |
Last edited by: Min_Moderator at: 11/3/2014 3:13 PMSplitted |
|
11/3/2014 9:00 AM | |
Joined: 1/28/2009 Last visit: 5/20/2024 Posts: 6840 Rating: (1359)
|
Hello Sudeep4138, It is possible but with some cautions.As an example you want to convert W#16#123 to the floating point equivalent 123.0.For this task, you should consider the source data as a valid BCD number and then convert to INT by using BTI.After that , using ITD---->DTR instructions will create the final real value.
BTI--->ITD-->DTR NOTE: BTI conversion may lead the CPU to enter the STOP mode in case of missing error OBs.Simply before conversion ensure that the Hex source data has a valid BCD representation without A,B,C,D,E,F. I hope this helps, Hamid Hosseini |
This contribution was helpful to1 thankful Users |
8/7/2015 9:39 PM | |
Joined: 6/27/2013 Last visit: 5/19/2024 Posts: 28 Rating: (0) |
here the core of the problem when I display it on wincc appears as negative and wrong value |
Follow us on