Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

reading binary data with GPIB read

Craig,

Hi friend,

I am trying to pull data from Advantest R3273 with GPIB to USB adapter and I am pulling the data through COM port by using VISA operations (initialize/ open/read/close). I selected binary data format because each trace point occupies '2' bytes while ASCII does '4'. With ASCII I have the correct data, but  with binary I receive strange characters  that needs to be translated. I used ASCII to close the project but the issue is still unresolved for me. I try what Minions said and let everybody knows.

Many Thanks

Ben

 

 

 

0 Kudos
Message 11 of 12
(315 Views)

If you are reading the binary data as ASCII, it is possible that one or more of the binary bytes will contain the same value as the <LF or CR> termination character and that will end the read.  You may need to use {Bytes at Port} until value is 0 to determine if there are any additional binary bytes and concatenate those to your string along with the termination character used when {Bytes at Port} is not equal to 0 in order to get the complete message response from the instrument.

Help the Community (and future reviewers) by marking posts as follows:
If it helped - KUDOS
If it answers the issue - SOLUTION
0 Kudos
Message 12 of 12
(304 Views)