Programming in G Mode
Chapter 7
GPIB-610 User Manual
7-6
© National Instruments Corp.
GPIB Read and Write Termination (END and
EOS)
You program the GPIB-232CT and the serial device to Talk in order to
send status information and serial data over the GPIB. You program the
GPIB-232CT and the serial device to Listen in order to receive
programming messages and serial data from the GPIB.
The IEEE-488 specification defines two ways that GPIB Talkers and
Listeners can identify the last byte of data messages: END and EOS. The
two methods permit a Talker to send data messages of any length without
the Listener(s) knowing in advance the number of bytes in the transmission.
END message
The Talker asserts the EOI (End or Identify) signal
simultaneously with transmission of the last data
byte. The Listener stops reading when it detects a
data message accompanied by EOI, regardless of the
value of the byte.
EOS character
The Talker uses a special character at the end of its
data string. The Listener stops receiving data when it
detects that character. Either a 7-bit ASCII character
or a full 8-bit binary byte can be used.
The two methods can be used individually or in combination. It is
important that the Listener be configured to detect the end of a
transmission.
When the GPIB-232CT receives its own talk or listen address, no EOS
modes are in effect. When talking, the GPIB-232CT asserts EOI with the
last byte of its response.
When the GPIB-232CT receives the serial device talk address, the EOS
modes in effect are those that you select using the
eos
function.
Serial Port Transmission
The GPIB-232CT checks the data received from the serial device for errors,
while buffering data. If a serial port error occurs, the GPIB-232CT records
the appropriate error code in its status area. To determine if a serial port
error has occurred, use
stat
to request the GPIB-232CT status