HP (Hewlett-Packard) 132A ユーザーズマニュアル

ページ / 330
Chapter 5  Errors
Error Queue
Programming Guide
5-3
10  ASSIGN @Cntr TO 703
20  !Assign path name
30  DIM Err_string$[255]
40  !Creates array for error string
50  REPEAT
60  !Repeats until error queue is empty
70  
OUTPUT @Cntr;“SYST:ERR?”
80  
!Read error number and string
90  
ENTER @Cntr;Err_num,Err_string$
100 
!Enter error number and string
110 
PRINT Err_num,Err_string$
120 
!Print error number and string
130 UNTIL Err_num = 0
140 END
Error Queue
As errors are detected, they are placed in an error queue. This queue is first in,
first out. That is, if there has been more than one error,
the first one in the queue is read out with :SYST:ERR?. Subsequent responses
continue until the queue is empty.
If the error queue overflows, the last error in the queue is replaced with error 
350, “Queue overflow”. Any time the queue overflows, the least recent errors
remain in the queue, and the most recent error is discarded. The length of the
Counter’s error queue is 30
(29 positions for the error messages, and 1 position for the  “Queue overflow”
error). Reading an error from the head of the queue removes that error from the
queue, and opens a position at the tail of the queue for a new error, if one is
subsequently detected.
When all errors have been read from the queue, further error queries return  +0,
“No error”.
The error queue is cleared when any of the following occur:
 
Upon power-on.
 
Upon receipt of a *CLS command.
 
Upon reading the last item from the queue.