5/12/2022 4:28 PM | |
Joined: 8/8/2012 Last visit: 3/26/2025 Posts: 34 Rating:
|
I am facing similar problem, want to read inverse float register, or swapped float register ( IEEE 754), there is no data type like that in wincc professional v15.1, any help will be appreciated. Kind regards ------------------------------------------------------------------------------------------ |
Last edited by: Loret at: 05/12/2022 16:29:06Last edited by: Jen_Moderator at: 05/13/2022 09:25:13New subject after splitting |
|
5/15/2022 8:40 AM | |
Joined: 12/18/2014 Last visit: 4/21/2025 Posts: 35142 Rating:
|
I think you must swap the High word and the Low word. |
5/15/2022 11:26 AM | |
Joined: 8/8/2012 Last visit: 3/26/2025 Posts: 34 Rating:
|
Thank you Sir can you guide me how to swap them without PLC, i mean to works only in the wincc side. thanks alot Loret |
5/18/2022 9:56 AM | |
Joined: 8/8/2012 Last visit: 3/26/2025 Posts: 34 Rating:
|
why why no one assisting me? my question is not clear? why |
5/18/2022 1:37 PM | |||||||
Joined: 5/1/2020 Last visit: 3/31/2025 Posts: 72 Rating:
|
Hello, if you could send me your high and low words in hex or dec format (like 5-6 examples) of the floating point registers i could try writing a script for you based on this excel file for conversion i found from schneider site. I also found a conversion formula: S: sign
iee754num=(-1)^S * 2^(E [dec format]-127) * (1.F)[Base 10] AttachmentIEEE751-floatingPoint calculator.xlsx (498 Downloads) |
||||||
Last edited by: Gdim93 at: 05/18/2022 13:37:35Last edited by: Gdim93 at: 05/18/2022 13:48:19 |
|||||||
5/18/2022 5:13 PM | |
Joined: 5/1/2020 Last visit: 3/31/2025 Posts: 72 Rating:
|
Ok after working on it on my own despite you not answering i ve come up with these 3 scripts that will turn your value to real format readable by wincc prof probably. You need to have your 2 registers for floating value set as integers And you add the convert to real function on value change of either of the tags.The conv_to_real function has as inputs your HSW and LSW of your registers.I am waiting for your feedback on if it worked. B11 is your value in Real format that is readable in WinCC Prof so if you make B11 show on an internal tag of your wincc you will get the proper real value shown. Code: [snip]
Attachmentcode.txt (491 Downloads) |
Last edited by: Gdim93 at: 05/18/2022 17:14:14Last edited by: Gdim93 at: 05/18/2022 17:16:12Last edited by: Gdim93 at: 05/18/2022 17:16:38Last edited by: Jen_Moderator at: 05/19/2022 07:02:24Code added as txt. file. |
|
Follow us on