From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

visa binary data

I am using viRead in vb to rad IEEE754 binary formatted data from a Keithley 2400 sourcemeter. The data is first read into a string buffer and looks like "#0vq?ßÖ#<aMB @PD". The first 2 bytes are the message header. The following are 5 32-bit floting point numbers. Can anybody tell me how I can turn this into meaningful numeric values?
0 Kudos
Message 1 of 2
(3,121 Views)
Hi Baffled,

There is something wrong with what you have posted here!

The string you show only has 17 bytes.

17 bytes - 2(bytes of header) = 15

15/4=3.75

Double check the # of bytes in the header and verify that there should be 5 values. I am guessing the mantissa may be padded with zeros.

Here is a LV example that shows how to work with the parts of of IEEE 754 representation.

http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=B123AE0CBCC2111EE034080020E74861&p_node=DZ53046&p_submitted=N&p_rank=&p_answer=&p_source=External

There is one more thing I should mention. IF YOU ARE USING LV, there are data manipulation operators located under the "Advanced" pallette that can swap bytes, words, etc.

If you have follow-up Q's and you
are workin gin LV, then post to the LV general forum for more help.

If not using LV, please ignore this distration,

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 2
(3,121 Views)