Status and Events
OA 5000 Series User Manual
3 --- 39
The OA 5000 status and event reporting system contains two queues: the
Output Queue and the Event Queue.
The Output Queue
The Output Queue stores up to 8000 bytes of a query response while it is
waiting to be output. The Output Queue is emptied each time a new com-
mand or query message is received, so that any query response must be
read before the next command or query is sent, or responses to earlier
queries will be lost, and an error may result.
The Event Queue
The Event Queue stores detailed information on up to 32 events. If more
than 32 events stack up in the Event Queue, the 32nd event is replaced by
event code 350, “Too many events.”
Read the Event Queue with either the EVENT? query (which returns only the
event number) or with the EVMSG? query (which returns the event number
and a text 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 that 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 a previous
*ESR? read 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.
Figure 3-11, on page 3---40, shows how to use the status and event handl-
ing system. In the explanation that follows, numbers in parentheses refer to
numbers in Figure 3-11.
When an event occurs, a signal is sent to the DESER (1). If that type of
event is enabled in the DESER (that is, if the bit for that event type is set to
1), the appropriate bit in the SESR is set to one and the event is recorded in
the Event Queue (2). If the corresponding bit in the ESER is also enabled
(3), then the ESB bit in the SBR is set to one (4).
When output is sent to the Output Queue, the MAV bit in the SBR is set to
one (5).
When a bit in the SBR is set to one and the corresponding bit in the SRER is
enabled (6), the MS S bit in the SBR is set to one and a service request is
generated (7).
Queues
Event Handling
Sequence