Other topics about Working with Automatic Test System
The status of the E5063A can be detected through the status registers. This section describes how to detect the end of measurement by using the status registers.
The occurrence of an error presents in the standard event status register. An SRQ (service request) is useful when you create a program that uses the information reported by this register to detect the occurrence of an error.
To detect the end of sweep via an SRQ, use one of the following commands:
*SRE
*ESE
Follow these steps:
Set the E5063A so that it generates an SRQ when any of the error occurrence bits is set to 1 in the standard event status register.
When an SRQ is generated, the program interrupts the measurement cycle.
SRQ generation sequence (when an error occurs)
An error queue holds the number for the error and the error message. Reading the error queue allows the user to verify the error that has occurred. To retrieve the content of an error queue, use the following command:
:SYST:ERR?
The error queue can be used in the following ways:
It is used as a branch for error handling. When an error queue is retrieved, it returns 0 as the error number and "No error" as the error message if no error is detected. This can be used to detect an error and for branching the flow of a program. This is also useful when you wish to handle specific error(s). Note that this method does not allow the user to perform any processing during the occurrence of an error.
When an error is detected using SRQ, the error queue is used to examine the error. Refer to the sample program in this section.