Saving and Recalling
When a typical sweep, like example program 3, is set up, the
States, Example
complete front panel state may be saved for later use in non-volatile
Program 5
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
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
Source=719
ABORT 7
LOCAL 7
CLEAR Source
REMOTE Source
CLS
OUTPUT
Source;“*RST;FREQ:MODE
SWE;STAR
4GHZ
;STOP
5GHZ;:INIT:CONT ON”
OUTPUT Source;
“*SAV
1”
CLS
PRINT “A sweeping state has been saved in REGISTER
1.”
OUTPUT
Source;“*RST;FREQ:CW
1.23456GHZ;:POW:LEV
-1DBM”
OUTPUT Source;
“*SAV
2”
PRINT
“A
CW state has been saved in REGISTER 2
.‘I
PRINT
‘I.
. . . .
Press Continue”
PAUSE
OUTPUT Source
;
“*RCL
1”
PRINT “Register 1 recalled. Verify source is sweeping.”
PRINT “Press Continue.
”
PAUSE
OUTPUT Source
;
“*RCL
2”
PRINT “Register 2 recalled.
‘I
PRINT “Verify source is in CW mode.
I’
END
Run the program.
Program Comments
10: Assign the source’s HP-IB address to a variable.
20 to 50: Abort any HP-IB activity and initialize the HP-IB
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
SWEepI’
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 l-97