LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing Binary Output from VectorNav VN100 IMU using LabVIEW

Solved!
Go to solution

Hi forums,

 

I'm trying to convert the binary output from an IMU sensor to a float. The sensor I'm using is a VectorNav VN100 (PDF user manual can be found here). The example given in the user manual (pg 41) is shown in the image below.

AudioVideoDisco_0-1574964167959.png

In the example the binary output stream from the sensor displayed in hex 0x422E5093 converts to a float value of +43.578686.... how??? When I convert using "Scan Value" I get a float value of 1110331539 - Google confirms this.

I must be missing something here? Is there an intermediate step in converting from Hex to Binary, and then on to decimal? Would this not give me the same value? Or is the manual wrong?

The VI attached shows my current workings and illustrates the problem I'm having.

 

Any help greatly appreciated,

 

~AVD

 

0 Kudos
Message 1 of 3
(3,792 Views)
Solution
Accepted by topic author AudioVideoDisco

0x422E5093 in decimal base is 1110331539

You have to scan as u32 and then type cast to float.

scan_float.png

Alternatively, use unflatten from string. You can set the endianness to little-endian so you don't have to reverse the string.

unflatten_float.png

Message 2 of 3
(3,768 Views)

Problem solved - thank you cordm!

0 Kudos
Message 3 of 3
(3,755 Views)