09-19-2016 08:04 AM
I have a byte array which I get from the sensor. I have manage to seperate the payload into three 4 sections. A and B and C are float values: A=+43.57, B=+1.88, C=-2.02. How may I proceed? I have tried type casting and converting to big endian. It doesnt work. Any ideas?
Solved! Go to Solution.
09-19-2016 08:09 AM
You are searching for FA but the attached VI with default doesnt contain FA.
Share us the data payload which you got and the expected decimal Value. will help you in converting using LabVIEW.
09-19-2016 08:12 AM - edited 09-19-2016 08:16 AM
In my project everything is correct. I duplicated the file and have mistakenly typed AA in the field. It should be FA.
09-19-2016 08:18 AM
I hope i i did similiar conversion couple of years before, i rememeber i gave the reference for typecast is SGL instead of DBL.
Just have a try.
09-19-2016 08:23 AM
@aan928 wrote:In my project everything is correct. I duplicated the file and have mistakenly typed AA in the field. It should be FA.
Its Working Just try this
09-19-2016 08:24 AM
Hi aan,
each part, consisting of 4 bytes, should be typecasted to a SGL value.
- Right now you typecast to DBL - FAIL 😄
- When the byte order is wrong you should use Reverse1DArray on those 4 byte-parts. Using SwapBytes/Words is wrong too…
- You can also use UnflattenFromString, which gives you the option to change the byte order for free…