Calibrator
Remote Program Examples
37
Error Queue
When a command error, execution error, or device-dependent error occurs, its error code is placed in
the error queue where it can be read by the ERR? command. A way to decode an error code is to send
the command, EXPLAIN?, which returns a description of a error code. Reading the first error with the
ERR? command removes that error from the queue. A response of 0 means the error queue is empty.
The Error Available (EAV) bit in the Status Byte Register indicates whether the queue is empty. The
error queue is cleared when you turn off the power, and when you use the *CLS (Clear Status)
common command.
The error queue contains up to 16 entries. If many errors occur, only the first 15 errors are kept in the
queue. A 16th entry in the queue is always an error queue overflow error, and all later errors are
discarded until the queue is at least partially read. The first errors are kept, because if many errors
occur before the user can acknowledge and read them, the earliest errors are the most likely to point to
the problem. The later errors are usually repetitions or consequences of the original problem.
Remote Program Examples
The programming examples below illustrate ways to handle errors, to take measurements, take a
number of successive readings, lock the range, and calibrate the Calibrator. These excerpts from
programs are written in DOS BASIC.
Guidelines for Programming the Calibrator
Commands are processed one at a time as they are received. Some commands require a previous
condition be set before the command will be accepted by the Calibrator. For example, the waveform
must be SQUARE before the DUTY command will be accepted. Use the programming guidelines
below to ensure that the output is programmed as necessary.
Program all external connections first. The Calibrator is placed in standby. Change the output to
accommodate the new external connection.You can make the setting even if the present output does
not use the setting (for example, setting the thermocouple type while sourcing voltage).
Next, program the output and output mode next with the OUT command.
•All other output parameters such as impedance compensation, offset, and waveforms should be
programmed next. The DUTY command must follow the WAVE command.
•Check the error status with the ERR? command.
•Finally, put the Calibrator into operate mode with the OPER command.
A controller program first initializes the interface and the Calibrator. Refer to this sample program:
10 INIT PORT 0 \ REMOTE @4 ! PUT THE 5560A INTO THE REMOTE STATE
20 PRINT @4, “*RST;OUT 10V;OPER” ! RESET THE 5560A, PROGRAM IT TO 10 VDC