04-09-2013 05:29 PM
Hi
I'm writing a program to acquire data from a SR 830 lock-in amp. I'm using its "fast 2" mode which transfers data in the following way, according to the manual :
"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)."
To read the data I use the "Visa read" VI, which outputs the data in a string. When I display the string as is, I get all sorts of wierd characters.
So can anybody help me to convert this to useable data ?
04-10-2013 12:06 AM
One character is one byte. So you have to put two characters together and interpret them as one 16 bit integer. With Labwindows/CVI you can use Scan() for doing that ( there are examples in the help) . If you are using another programming environment, please tell us , what you are using.
04-10-2013 05:54 AM
Hi mkossman
Thanks for your answer. I'm using Labview 2009.
04-10-2013 08:31 AM
I searched for "scan", and found "scan value" and "scan from string". Which one should I use ?
04-11-2013 01:07 AM