Martel Electronics 3001 User Manual
Page 53
to binary represents bits 0 through 15.
9) Output Queue
The output queue is loaded whenever a query is processed, and holds up to 250
characters. The controller reads it with a statement such as a BASIC INPUT
statement, removing what it reads from the queue. If the queue is empty, the 3001
does not respond to the INPUT statement from the controller. The Message Available
(MAV) bit in the Serial Poll Status Byte is 1 if there is something in the output queue,
and 0 if the output queue is empty.
10) Error Queue
When a command error, execution error, or device-dependent error occurs, its error
code is placed in the error queue where it can be read by the FAULT? command.
Reading the first error with the FAULT? command removes that error from the queue.
A response of 0 means the error queue is empty. The error queue is cleared when
you turn off the power, and when you use the *CLS (Clear Status) common
command. The error queue contains up to 15 entries. If more than 15 errors occur,
only the first 15 errors are kept in the queue. A 16th entry in the queue is always an
"error queue overflow" error, and all later errors are discarded until the queue is at
least partially read. The first errors are kept, because if many errors occur before the
user can acknowledge and read them, the earliest errors are the most likely to point
to the problem. The later errors are usually repetitions or consequences of the
original problem.
11) Input Buffer Operation
As the 3001 receives each data byte from the controller, it places the byte in a portion
of memory called the input buffer. The input buffer holds up to 250 data bytes and
operates in a first in, first out fashion.
IEEE-488 interface:
The 3001 treats the IEEE-488 EOI control line as a separate data byte and inserts it
into the input buffer if it is encountered as part of a message terminator. Input buffer
operation is transparent to the program running on the controller. If the controller
sends commands faster than the 3001 can process them, the input buffer fills to
capacity. When the input buffer is full, the 3001 holds off the IEEE-488 bus with the
NRFD (Not Ready For Data) handshake line. When the 3001 has processed a data
byte from the full input buffer, it then completes the handshake, allowing the
controller to send another data byte. The calibrator clears the input buffer on power-
up and on receiving the DCL (Device Clear) or SDC (Selected Device Clear) message
from the controller.
RS-232 interface:
The 3001 uses the RS-232-C Xon/Xoff protocol to control buffer overflow. The 3001
sends a Xoff (Ctrl S) character when the input buffer becomes 80% full, and sends a
Xon (Ctrl Q) character when it has processed enough of the input buffer so that it is
less than 40% full.
49