Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting raw data...

Hi all

 

I'm trying to obtain data from a lock-in amplifier. I managed to take data with some command that sent me data in a string with ieee 745 format, but now i'm using a faster command that sends me this type of data:

 

"The values of X and Y are transferred as signed integers, 2 bytes long (16 bits). X is 

sent first followed by Y for a total of 4 bytes per sample. The values range from -32768 

to 32767. The value ±30000 represents ±full scale (i.e. the sensitivity). 

 

 Offsets and expands are included in the values of X and Y. The transferred values are 

(raw data - offset) x expand. The resulting value must still be a 16 bit integer. The value 

±30000 now represents ±full scale divided by the expand factor. 

 

 I don't understand what i've to do to convert this type of data...i don't even imagine well how this data is formed...exponent? Mantissa? Nothing is said!

I've to obtain values like 0,4872 mV...

 

Can someone help me? Even giving me some hints...

 

Thanks 

0 Kudos
Message 1 of 2
(3,275 Views)

Hi

 

No mantissa, integers are just values. So 16 bit per value, each four bytes give two 16 bit words.

In LAbVIEW I would treat this as an array of I16 and find a way to define the array such that one column or row gives me all x-values and the other one all y values.

 

Only problem left is where to find the ofset and expand value to add and/or multiply.

greetings from the Netherlands
0 Kudos
Message 2 of 2
(3,251 Views)