Saving and Recalling
States, Example
Program 5
When a typical sweep, like example program 3, is set up, the
complete front panel state maybesaved for later use in non-volatile
memories called registers 1 through 8. This can be done remotely as
a part of a program. Clear and reset the controller and type in the
following program:
10 Source=719
20 ABORT 7
30 LOCAL 7
40 CLEAR Source
50 REMOTE Source
60 CLS
70 OUTPUT Source;"*RST;FREQ:MODE SWE;STAR 4GHZ
;STOP 5GHZ;:INIT:CONT ON"
80 OUTPUT Source;"*SAV 1"
90 CLS
100 PRINT "A sweeping state has been saved in REGISTER 1."
110 OUTPUT Source;"*RST;FREQ:CW 1.23456GHZ;:POW:LEV -1DBM"
120 OUTPUT Source;"*SAV 2"
130 PRINT "A CW state has been saved in REGISTER 2."
140 PRINT "..... Press Continue"
150 PAUSE
160 OUTPUT Source;"*RCL 1"
170 PRINT "Register 1 recalled. Verify source is sweeping."
180 PRINT "Press Continue."
190 PAUSE
200 OUTPUT Source;"*RCL 2"
210 PRINT "Register 2 recalled."
220 PRINT "Verify source is in CW mode."
230 END
Run the program.
Program Comments
10: Assign the source's GPIB address to a variable.
20 to 50: Ab ort any GPIB activity and initialize the GPIB
interface.
60: Clear the computer's display.
70: Set up the source for a sweeping state. Note the combination
of several commands into a single message. This single line is
equivalent to the following lines:
OUTPUT Source;"*RST"
OUTPUT Source;"FREQ:MODE SWEep"
OUTPUT Source;"FREQ:STARt 4 GHZ"
OUTPUT Source;"FREQ:STOP 5 GHZ"
OUTPUT Source;"INIT:CONT ON"
80: Save this state into storage register 1.
Getting Started Programming 1-97