User`s manual
DEBUG3 : Start Each Program by Fully Resetting Each Instrument
An instrument is fully reset when you cycle power or go through the three
levels of the reset hierarchy. It is important to go through all levels in the
proper order because some instruments can set conditions that can only be
aborted by this sequence.
1. Issue an IEEE-488 Interface clear which will remove any bus
deadlocks. (i.e.
ABORT 7)
2. Issue an IEEE-488 selected device clear which will terminate
instrument activity and clear the input/output buffers (i.e.
CLEAR
70900
).
3. Reset each instrument and wait for the reset to complete.
*RST;*CLS;*ESE 0;*SRE 0;*OPC?
/* enter the data (1) returned by *OPC? */
*RST resets the instrument.
*CLS;*ESE 0;*SRE 0 resets the instrument’s status subsystem that
is defined by IEEE 488.2.
*OPC? outputs a “1” when all commands before it have completed.
DEBUG4 : Query the Instrument for Errors
SCPI defines that all instruments will have an error queue. Any time an
error occurs, a message is placed in this queue. This error queue is read by
sending the SYST:ERR? command.
Knowing that the error queue exists and reading it frequently is one of the
most important things to do. Another common problem is to send a
command string that has a syntax error. When the command is parsed and
the error is detected, a message is written to the error queue. However, no
other action is taken as the instrument does not know what the command
was supposed to do. Generally, no indication of an error is given, and
reading the error queue is the only way to get feedback if an error is
detected.
/* repeat */
SYST:ERR?
/* enter and print error data */
/* until there are no more errors in the queue */
C-Size Configuration Guide System Programming and Debugging 6-9