nikitost Posted October 22, 2020 Report Posted October 22, 2020 Hello! I have a float number (HEX: 3CA01D0F) in Big Endian. It's 0.0195451062. I get it from the sensor and store it in a double word variable. Could you help me? How can I convert DWord to Float? If i use DFLT instruction, It treats DWord as an integer (1017126159) and just gives me 1.017126 e+009 Thanks in advance.
nikitost Posted October 23, 2020 Author Report Posted October 23, 2020 Actually I need to read this from register D. So I found function DEMOV(TRUE, D0, MyFloatVar); It transfer bytes from D0-D1 to my variable in correct format.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now