Using the User Flatness
Correction Commands,
Example Program 8
The following program interrogates the swept signal generator and an
HP/Agilent 437B p ower meter for frequency and p ower information
respectively. The swept signal generator is programmed to sweep
from 2 to 20 GHz, with frequency-correction pairs every 100 MHz
and +5 dBm leveled output p ower. For this example, we assume
that the path losses do not exceed 5 dBm and that the HP/Agilent
437B power meter already has its power sensor's calibration factors
stored in sensor data table 0. If another power meter is used, the
power sensor's calibration factors will have to b e stored in a lo ok-up
table. Mo dify the program to suit your particular measurement
requirements. Up to 801 p oints maybeentered in the user atness
correction table with this program.
SCPI commands are used to set up the source parameters and enter
correction frequencies and data into the correction table.
10 !ASSIGN THE ADDRESS TO THE SOURCE AND POWER METER
20 DIM A$[5000],B$[5000]
30 ASSIGN @Source TO 719
40 ASSIGN @Meter TO 713
50 INTEGER Error_flag
60 ABORT 7
70 !
80 !SET UP SOURCE
90 OUTPUT @Source;"*RST"
100 OUTPUT @Source;"FREQ:MODE SWE;STAR 2 GHZ;STOP 20 GHZ"
110 OUTPUT @Source;"SWEEP:TIME 200 MS"
120 OUTPUT @Source;"POW:LEV 5 DBM;:INIT:CONT ON"
130 OUTPUT @Source;"*OPC?"
140 ENTER @Source;Done
150 !
160 !SET UP POWER METER
170 OUTPUT @Meter;"PR"
180 OUTPUT @Meter;"FA"
190 OUTPUT @Meter;"TR0"
200 !
210 !ZERO POWER METER
220 OUTPUT @Source;"POW:STAT OFF"
230 Zero_meter(@Meter,@Source,Error_flag)
240 IF Error_flag THEN
250 BEEP
260 CLEAR SCREEN
270 PRINT "ERROR:METER DID NOT COMPLETE ZEROING OPERATION!"
280 ELSE
290 !
300 !SET UP CORRECTION FREQUENCIES IN USER FLATNESS CORRECTION TABLE
310 !OUTPUT @Source;"CORR:FLAT ";
320 Start_freq=2
330 Stop_freq=20
340 Increment=1
350 N=(((Stop_freq-Start_freq)/Increment)+1)
Getting Started Programming 1-103