TDS5000B Online Programmer Guide
-- 8 5 5 --
Queues
The *PSC command controls the Enable Registers contents at power--
on. Sending *PSC 1 sets the Enable Registers at power on as follows:
Output Queue
The instrument stores query responses in the Output Queue and empties
this queue each time it receives a new command or query message after
an <EOM>. The controller must read a query response before it sends
the next command (or query) or it will lose responses to earlier queries.
Caution: When a controller sends a query, an <EOM>, and a second
query, the instrument normally clears the first response and outputs the
second while reporting a Query Error (QYE bit in the ESER) to indi-
cate the lost response. A fast controller, however, may receive a part or
all of the first response as well. To avoid this situation, the controller
should always read the response immediately after sending any termi-
nated query message or send a DCL (Device Clear) before sending the
second query.
Event Queue
The Event Queue stores detailed information on up to 33 events. If
more than 32 events stack up in the Event Queue, the 32nd event is re-
placed by event code 350, ”Queue Overflow.”
Read the Event Queue with the EVENT? query (which returns only the
event number), with the EVMSG? query (which returns the event num-
ber and a text description of the event), or with the ALLEV? query
(which returns all the event numbers along with a description of the
event). Reading an event removes it from the queue.
Before reading an event from the Event Queue, you must use the
*ESR? query to read the summary of the event from the SESR. This
makes the events summarized by the *ESR? read available to the
EVENT? and EVMSG? queries, and empties the SESR.
Reading the SESR erases any events that were summarized by previous
*ESR? reads but not read from the Event Queue. Events that follow an
*ESR? read are put in the Event Queue but are not available until
*ESR? is used again.
Event Handling Sequence
The figure below shows how to use the status and event handling sys-
tem. In the explanation that follows, numbers in parentheses refer to
numbers in the figure.