LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

32-Bit Binary/Hex to decimal using IEEE 754 converter, FPGA

Highlighted

Hello, and thank you in advance for responding.

Using the FPGA platform, we are aquiring data from a CAN module that is producing a 32-bit binary data type. We need to use a IEEE 754 converter to write a decimal number to our RT vi.

When looking at our front panel.... our current FPGA is outputting the "decimal" value to our RT vi. However, the IEEE 754 conversion of either the Hex or Binary number shown on the front panel should yield a decimal value of 3935, and we are getting a decimal value of 1165357056.

We have tried, unsuccessfully, in our RT vi to use a IEEE 754 converter but our FPGA is outputting the incorrect decimal number through our FIFO to our RT vi. Any suggestions? We would like to be able to write this code using the FPGA side of our program, but are unsure how to make this happen. Any help to this regard would be greatly appreciated. -Thank you

Download All
0 Kudos
Message 1 of 2
(2,849 Views)
Highlighted

Hi aaron,

 

you need to swap bytes/words: 0x4575f000 will typecast to SGL with value 0d3935…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 2
(1,110 Views)