04-02-2009 08:18 PM
I need some help understanding how VISA reads from GPIB. Using LabView 8.6, I am making an application to communicate with a custom controller using GPIB. Currently it works, but I am unsure of how to use the Termination Enable property.
I am reading from GPIB using VISA Read. I am using 1000 for byte count. VISA timeout is set to 30 sec. The controllers termination character is a ">" (ascii 62).
1. How does VISA know when to terminate the read if there are less than 1000 bytes to read, termination character is off, and it is within the timeout period? Does VISA stop when no more bytes are coming in? This works for me with termination off, but with termination on it is much slower and I don't understand why.
2. I also use the GPIB-RS232 converter for certain situations. The PC has the GPIB and the controller has RS232. Using the converter, I need to enable the termination character in order for it to function properly.
Solved! Go to Solution.
04-02-2009 10:37 PM
A GPIB read should terminate when EOI is detected. This is one of the interface management lines and is a requirement for GPIB. A termination character of > is very strange. Setting any kind of termination character for a GPIB instrument designed in the last 20 years or more is, to put it politely, unusual. Your calling it a controller raises another question. There is usually only one controller in a GPIB system and this would be a device like NI's PCI-GPIB or USB-GPIB-HS. Are you trying to design your own controller?
Since RS-232 has none of the management lines that GPIB does, you need some other mechanism to terminate a read.
04-03-2009 08:36 AM
Ok I understand now. I didn't really know about or understand the EOI line. The controller I am referring to is more of a microcontroller that controls a centrifuge type table. They have either GPIB or RS232 or both depending on what our customer wants. I can send several different commands to it, all of which will send a response back. The code it is programmed with sends a ">" as an EOS character because it always replies with multiple lines of information which contains multiple CRs and/or LFs.
So I should be able to use no termination for normal GPIB and depend on EOI. With the GPIB-RS232 converter there is no EOI, so that's why I need the termination enabled.