Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

send bitstream not string over gpib

I have an instrument, through which I actively communicate via gpib (usb-gpib-hs actually). I now need to send the instrument a series of 16bit integer values (0's and 7fffxh's alternating). I have tried flattening the array of int16's into a string to send but the string does not convert correctly. I have to also send the instrument the number of bits that will be sent as well as the 16bit checksum. It is the checksum that fails. I know the instrument is operational, so I can eliminate that.

 

How do I send the int16 bitstream via gpib without converting it to a string first? IF there is not a way how do I properly convert it? Thank you in advance

 

0 Kudos
Message 1 of 4
(3,576 Views)

Are you using LabVIEW? If so, how do you have the byte order set with the flatten to string? Little or big endian?

0 Kudos
Message 2 of 4
(3,565 Views)

and instead of flattening to string I would use split integer to et bytes and then put these in an array of bytes that can be converted into a string, not flattened

greetings from the Netherlands
0 Kudos
Message 3 of 4
(3,536 Views)

Dennis

You were right. I needed to send it little-endian rather than big-endian. That is instrument specific. Thank you!

 

 

0 Kudos
Message 4 of 4
(3,531 Views)