Handbook
November 2011
/
59-UMC0071
/
Issue
01
Mercury
iTC
Page 98
REMOTE OPERATION
Original Instructions
7.4.3
Accepting responses via the GPIB.
Messages issued by the iTC on the GPIB consist by default of an ASCII character
string, terminated by a
Carriage Return
. The instrument can be configured to send an
additional
Line Feed
, if required, by sending a initial
Q2
command after power-up. The
Q2 message itself produces no response, but all subsequent responses are terminated
by the
Carriage Return/Line Feed
pair.
The interface never asserts the
EOI
line at the end of a message. Instead it allows either
Carriage Return
or
Line Feed
to be used as the
End-of-String
(
EOS
) character.
7.4.4
Status byte and use of a serial poll
The GPIB controller must be able to determine when the iTC has data to be read. If the
iTC is configured to talk, but no data is available, the controller will wait indefinitely
unless a timeout period has been defined.
The program running on the GPIB controller can be written so that it only waits for a
response when the last command sent is expected to produce data. However this is
method is unreliable if some unexpected event occurs.
A better method is for the GPIB controller to read a status byte from the iTC by
conducting a serial poll. The iTC always returns a status byte when a serial poll is
conducted.
Three bits in the status byte are significant:
Bit 6 (value 64 decimal)
RQS (requesting service)
Bit 4 (value 16 decimal)
MAV (message available)
Bit 1 (value 2 decimal)
BAV (byte available)
7.4.4.1
RQS bit
The position of the RQS bit is specified in the IEEE-488.1 and IEEE-488.2 standards.
The RQS bit indicates that the iTC has requested service by asserting the GPIB SRQ
line TRUE.
The RQS bit is reset when the GPIB controller reads the status byte, which allows the
interface to clear the SRQ line. If the GPIB controller reads the status byte again, the
RQS bit will be zero, even if the service request has not been actioned. The program
running on the GPIB controller must remember that the iTC has requested service. The
RQS bit is only set again if the iTC requests service again.
7.4.4.2
BAV bit
The BAV bit is set as soon as at least one byte of data is available to be read. The BAV
bit always reflects the status of the iTC at the time that the status byte was read.
7.4.4.3
MAV bit
The MAV bit is set when a complete message (including the <CR> or <LF> character) is
available to be read. The MAV bit always reflects the status of the iTC at the time that
the status byte was read.