LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read a string on an GPIB link

Hello,

I want to read a string on a GPIB link.
to do this I have create a sub-vi with a VISA_READ fonction.
but my trouble is i can't find the number of caracters to read on this
port!
so my actualy solution is to read caracters after caracters...so it's
a very bad solutions, can you please give me a better way to read this
port faster?

Thanks you for your help.

Jean-Noel Dotter
0 Kudos
Message 1 of 3
(2,681 Views)
This depends upon how your system is configured. There are different types of handshaking from GPIB lines. If your communication is set up so that a NULL character means the information is finished being sent, then you can tell it to read well more characters than you expect. Then, it will begin reading them but will stop reading and return execution when it reaches that NULL character. This is the easiest way to set up the system if you don't know how many characters to read.
J.R. Allen
0 Kudos
Message 2 of 3
(2,681 Views)
The majority of gpib instruments will transmit EOI and a VISA read will terminate when either byte count or EOI is read. Therefore, all you have to do is set the byte count to a number higher than what you expect and you will read the entire string assuming the instrument transmits. To avoid lengthy delays in your program if the instrument is off-line, set the VISA timeout to a reasonable number.
0 Kudos
Message 3 of 3
(2,681 Views)