Programming with GPIB Commands
2-25 Programming Examples
MG369xC GPIB PM
PN: 10370-10374 Rev. F
2-67
The following program accepts user inputs for (1) power sweep starting and ending levels, (2) number of
steps in the sweep, and (3) sweep dwell times. After accepting such inputs, the program then commands
the signal generator to obtain a display of the power sweep.
Note:
The signal generator should be connected to a scalar network analyzer.
30 Address=705
40 CALL Iddev(Address,Model,Fmin,Fmax,Pmin,Pmax)
60 DISP “ENTER POWER SWEEP STARTING LEVEL (dBm)”;
70 INPUT Powerstart
80 IF Powerstart>Pmax OR Powerstart<Pmin THEN
90 DISP “POWER OUT OF RANGE - ”;
100 GOTO 60
110 ENDIF
120 DISP “ENTER POWER SWEEP ENDING LEVEL (dBm)”;
130 INPUT Powerstop
140 IF Powerstop>Pmax OR Powerstop<Pmin THEN
150 DISP “POWER OUT OF RANGE - ”;
160 GOTO 120
170 END IF
180 DISP “ENTER NUMBER OF STEPS”;
190 INPUT Noofsteps
200 IF Noofsteps<1 OR Noofsteps>10000 THEN
210 DISP “NUMBER OF STEPS OUT OF RANGE - ”;
220 GOTO 180
230 END IF
240 DISP “ENTER DWELL TIME AT EACH STEP (mS)”;
250 INPUT Dwell
260 IF Dwell<1 OR Dwell>99000 THEN
270 DISP “DWELL TIME OUT OF RANGE - ”;
280 GOTO 240
290 END IF
300 OUTPUT Address;"L1";Powerstart:"DM L2";Powerstop;
“DM PNS”;Noofsteps;"SPS"
310 OUTPUT Address;"PDT";Dwell;"MS LSP"
340 END
1010 SUB Iddev(Address,Model,Fmin,Fmax,Pmin,Pmax)
1020 DIM Ident$[36]
1030 OUTPUT Address;"OI"
1040 ENTER Address;Ident$
1050 Model=VAL(Ident$[1,2])
1060 Model Number=VAL(Ident$[3,4])
1070 Fmin=VAL(Ident$[5,9])
1080 Fmax=VAL(Ident$[10,14])
1090 Pmin=VAL(Ident$[15,20])
1100 Pmax=VAL(Ident$[21,24])
1110 Model Prefix=Ident$[35,35]
1120 Series=VAL(Ident$[36])
1130 SUBEND
NOTE:
The program explanation is on the next page.
Figure 2-20.
Controlling Power Level and Power Sweep (1 of 2)
Summary of Contents for MG369 C Series
Page 2: ......
Page 6: ...Contents 4 PN 10370 10374 Rev F MG369xC GPIB PM ...
Page 262: ...A 34 PN 10370 10374 Rev F MG369xC GPIB PM ...
Page 264: ...Index 2 PN 10370 10374 Rev F MG369xC GPIB PM ...
Page 265: ......