
Queries, Example Program 4
160:The source has now completed processing the commands. The RF frequency, power, and markers are at their programmed values. Turn on the RF output of the source.
170:Select a continuously initiated sweep instead of the default mode of
180: Clear the computer’s display.
190 to 220: Print a message on the computer’s display.
The following example demonstrates the use of query commands and response data formats. Clear and reset the controller and type in the following program:
10Source=719
20ABORT 7
30LOCAL 7
40CLEAR Source
50REMOTE Source
60CLS
70OUTPUT Source;"*RST"
80OUTPUT Source;"POWER:LEVEL
90OUTPUTSource;"FREQ:CW?"
100ENTER Spurce;F
110PRINT "Present source CW frequency is : ";F/l.E+6;"MHz"
120OUTPUT Source;"POWER:STATE?"
130ENTER Source;W
140PRINT "Present power ON/OFF state is : ";W
150OUTPUT Source;"FREQ:MODE?"
160DIM A$[101
170ENTER Source;A$
180PRINT "Source's frequency mode is : "&A$
190OUTPUT Source;"FREq:CW? MIN"
200ENTER Source;A
210 PRINT "Minimum source CW frequency is : ";A/l.E+G;"MHz"
220OUTPUT Source;"FREQ:START?;STOP?"
230ENTER Source;X,Y
240 PRINT "Swept frequency limits :" 250 P R I N T " S t a r t ";X/l.E+6;"MHz" 260 PRINT ' Stop ";Y/l.E+6;"MHz"
270 END
Run the program.
Program Comments
10: Assign the source’s
20 to 50: Abort any
60: Clear the computer’s display.