Using the User Flatness
The
following program interrogates the swept
CW
generator and
Correction Commands,
an
HP 437B
power meter for frequency and power information
Example Program 8
respectively.
The swept CW
generator is programmed to sweep from
2 to 20
GHz,
with frequency-correction pairs every 100 MHz and
+5
dBm
leveled output power. For this example, we assume that the
path losses do not exceed 5
dBm
and that the HP 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 be stored in a look-up table. Modify
the program ‘co suit your particular measurement requirements. Up
to 801 points may be entered in the user flatness 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
20
30
40
50
60
70
80
90
100
110
120
130
140
150
160
170
180
190
200
210
220
230
240
250
260
270
280
290
300
310
320
330
340
350
!ASSIGN
THE ADDRESS TO THE SOURCE AND POWER METER
DIM
A$[5OOO],B$[5000]
ASSIGN @Source TO 719
ASSIGN
@Meter
TO 713
INTEGER Error-flag
ABORT 7
I
!SET UP SOURCE
OUTPUT
QSource;"*RST"
OUTPUT
QSource;"FREq:MODE
SWE;STAR 2 GHZ;STOP 20
GHZ"
OUTPUT
QSource;"SWEEP:TIME
200 MS"
OUTPUT
OSource;"POW:LEV
5 DBM;:INIT:CONT
ON"
OUTPUT
QSource;"*OPC?"
ENTER QSource;Done
!SET UP POWER METER
OUTPUT
QMeter;"PR"
OUTPUT
QMeter*"FA"
OUTPUT
QMeterj"TR0"
!ZERO
POWER METER
OUTPUT
OSource;"POW:STAT
OFF"
Zero-meter(QMeter,QSource,Error_flag)
IF Error-flag THEN
BEEP
CLEAR SCREEN
PRINT
"ERROR:METER
DID NOT COMPLETE ZEROING OPERATION!"
ELSE
I
!SET UP CORRECTION FREQUENCIES IN USER FLATNESS CORRECTION TABLE
!OUTPUT
OSource;"CORR:FLAT
";
Start_freq=2
Stop_freq=20
Increment=1
N=(((Stop-freq-Start_freq)/Increment)+l)
Getting Started Programming
l-
103