1
Introduction to Programming
Message Queues
How the Input Queue Works
Clearing the Input Queue
The Output Queue
The Error Queue
10
The instrument exchanges messages using an input and an output queue.
Error messages are kept in a separate error queue.
The input queue is a FIFO queue (first-in first-out). Incoming bytes are
stored in the input queue. The parser starts if the LF character is received.
Switching the power off, or sending a Device Interface Clear signal, causes
commands that are in the input queue, but have not been executed to be
lost.
The output queue contains responses to query messages. The instrument
transmits any data from the output queue when a controller addresses the
instrument as a talker.
Each response message ends with a LF (0A
the query has an error, the output queue remains empty.
The Message Available bit (MAV, bit 4) is set in the Status Byte register
whenever there is data in the output queue.
The error queue is 30 errors long. It is a FIFO queue (first-in first-out). That
is, the first error read is the oldest error to have occurred. For example:
1
If no error has occurred, the error queue contains:
o error"
+ 0, "N
2
After a command such as
o error"
+ 0, "N
-113, "Undefined header"
3
If the command is immediately repeated, the error queue now
contains:
o error"
+ 0, "N
-113, "Undefined header"
-113, "Undefined header"
Keysight N778xC Series Polarization Instruments Programming Guide
). If no query is received, or if
16
wav:pow
, the error queue now contains: