Specifications

134 Chapter 10
Error Handling
Using the Error Queue
Using the Error Queue
When an error occurs, its number and message will be stored in the error queue. Thus, you
can determine which error has occurred by reading the contents of the error queue. Use the
folowing command to read the contents of the error queue:
:SYST:ERR? on page 304
You can also use the following command to check how many errors are contained in the
error queue:
:SYST:ERR:COUN? on page 304
Some examples of using the error queue are given below:
1. Use the error queue for branching control of the program in response to an error. If no
error has occurred, the contents read out from the error queue are 0 for the number and
“No error” for the message. This can be used to verify the occurrence of any error and
is thus useful for the branch processing flow of your program. This is also used to
handle a specific error that may be predefined in the program. This method, however, is
not suitable for performing tasks synchronized with the occurrence of errors.
2. Use the error queue to identify an error that is detected via an SRQ (service request)
(see Example 10-1).