Chapter 5 Errors

Error Queue

10ASSIGN @Cntr TO 703

20!Assign path name

30DIM Err_string$[255]

40!Creates array for error string

50REPEAT

60!Repeats until error queue is empty

70OUTPUT @Cntr;“SYST:ERR?”

80!Read error number and string

90ENTER @Cntr;Err_num,Err_string$

100!Enter error number and string

110PRINT Err_num,Err_string$

120!Print error number and string

130UNTIL Err_num = 0

140END

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.

Programming Guide

5-3