Error Handling

Other topics about Remote Control

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:

You can also use the following command to check how many errors are contained in the error queue:

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).

Using the Status Reporting System

The status of the E4982A can be detected through the status registers. This section explains how to use the status registers to detect the occurrence of an error. For a complete description of the status report mechanism, including the specifications of each bit, see Status Reporting System.

Occurrence of an error will be reflected in the standard event status register. An SRQ is useful when you create a program that uses the information reported by this register to detect the occurrence of an error.

Use the following commands to detect the end of sweep via SRQ:

Follow these steps:

  1. Set the E4982A to generate an SRQ when “1” is assigned to one of the error occurrence bits of the standard event status register.

  2. Describe the program so that it executes interruption processing as soon as an SRQ is generated.

Sample Program

See the Detecting an Error via an SRQ.