User manual

56 Using the Relay Multiplexer Chapter 2
Saving and
Recalling States
The *SAV <numeric_state> command saves the current instrument state.
The state number (0-9) is specified in the numeric_state parameter. The
following settings are saved:
Channel Relay States (bank 0-7 relays open or closed)
Control Relay States (bank 9 relays open or closed)
ARM:COUNt
TRIGger:SOURce
OUTPut[:STATe]
INITiate:CONTinuous
[ROUTe:]SCAN:MODE
[ROUTe:]SCAN:PORT
The *RCL <numeric_state> command recalls a previously saved state.
Enter the number (0-9) in the numeric_state parameter of the desired saved
state. If *SAV was not previously executed using the selected number, the
multiplexer module will configure to the reset values (refer to table 2-2).
NOTE *RCL, *RST, and *SAV do not affect the operating mode as set by the
FUNCtion command or status register switch positions. If using the
FUNCtion command to set the operating mode, the *SAV/*RCL command
must be executed AFTER the FUNCtion command.
Detecting Error
Conditions
There are two general approaches to error checking: polling and using
interrupts. An example of each method follows.
Example: Error Checking
Using Polling
The simplest, but most time consuming, method is to ask the instrument
whether there are errors at every step of the switching process. This is called
polling and is illustrated in the following example.
10 DIM Err_num$[256]
20 OUTPUT 70914;"CLOS (@101)"
30 OUTPUT 70914;"SYST:ERR?"
40 ENTER 70914;Err_num$
50 IF VAL (Err_num$) 0 THEN
60 PRINT "Error";Err_num$
70 STOP
80 END IF
90 ...(program continues)