LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting byte array to single

I have recieved a byte array from a devicenet card and I need to parse this out.

Most of the elements are floats but there are a few bytes in there too (padded to fit 4 bytes). I have reshaped the array into 13x4 bytes so now I just need to make 2 arrays from it, one for the floats and the other for the bytes.

I'm assuming this has to be done individually.

How can I go about this? How can I change index element 0 (0,0-0,3) to become a single.

Ron
0 Kudos
Message 1 of 2
(3,518 Views)
You just need to typecast the subarray representing the SGL. If the raw data is little endian, you need ot reverse the byte order first for each set of four bytes.
0 Kudos
Message 2 of 2
(3,505 Views)