g.mccormick
Lifetime Supporting Member
I am needing to convert the low DWORD of a timestamp into a LREAL.
The DWORD is a 32bit unsigned number. In TwinCat2, I keep getting a negative value when the value goes high enough that the highest bit turns on. I've triied doing the DWORD_TO_LREAL and UDINT_TO_LREAL conversion functions to no avail. Do I need to be doing byte manipulations or something?
The DWORD is a 32bit unsigned number. In TwinCat2, I keep getting a negative value when the value goes high enough that the highest bit turns on. I've triied doing the DWORD_TO_LREAL and UDINT_TO_LREAL conversion functions to no avail. Do I need to be doing byte manipulations or something?