User`s guide
2-46
GPIB Tutorial and Examples
Program 3
3050 Deltapower=ABS(Fastpower1-Fastpower2) !Look for change since
last measurement
3060 Count=Count+1 !Though away 4 old
readings (in Agilent 8922M/S
3070 UNTIL (Count>4 AND Deltapower<Fpthreshold) OR Count>10 !measuremement
pipline) then look for settled
3080 IF Count>10 THEN !value on new mea-
surement ARFCN. If it never
3090 Errcount=Errcount+1 !settles note an error
3100 Error$(Errcount)=”Mobile’s output power did not settle within
‘Fpthreshold’ limits”
3110 END IF
3120 Fpwrmeas(Arcount,Txcount)=(Fastpower1+Fastpower2)/2 !Average last two
good readings
3130 OUTPUT Uut;”RFAN:AMPL1?” !Read the
Agilent 8922M/S analyzer expected input level
3140 ENTER Uut;Anlevel !and compare with the
measured power to check that
3150 Threedb=ABS(Anlevel-Fpwrmeas(Arcount,Txcount)) !the result is within
the allowed +/-3dB window
3160 Txlevcount=Txlevcount+1
3170 UNTIL Threedb<Leveltol OR Txlevcount>10 OR Txlevchange$=”false”
3180 IF Threedb>3 THEN
3190 Errcount=Errcount+1
3200 Error$(Errcount)=”Fast power meas 3dB input range exceeded”
3210 END IF
3220 Txlevchange$=”false”
3230 NEXT Arcount
3240 NEXT Txcount
3250 !
3260
!==================================================================================
3270 !
3280 !PERFORM BIT ERROR MEASUREMENTS
3290 ! !Note: 4 BER measurements
can be made in parallel
3300 OUTPUT Uut;”DISP:SCR BER1” !Display single BER
test screen
3310 FOR Rxcount=1 TO Numberpwr !Outer loop for down-
link power levels
3320 Berpo=Berpwr(Rxcount) !Get downlink power
level from array
3330 OUTPUT Uut;”RFG:AMPL1 “;Berpo !Program Agilent 8922M/
S Generator to downlink power
3340 FOR Arcount=1 TO Numberarfcn !Inner loop for BER
test ARFCN
3350 Arfcn=Berarfcn(Arcount) !Get ARFCN from array
3360 Freq=(890+Arfcn*.2)*1000000 !Calculate frequency
from ARFCN
3370 CALL Sub_trickmobile(Uut,”ARFCN”,Arfcn,0,Freq,Extloss) !Command test mode
mobile to new ARFCN
3380 OUTPUT Uut;”RFAN:FREQ “;Freq !Tune analyzer fre-
quency
3390 OUTPUT Uut;”TRIG:BET:MODE ‘RUN’” !off BER test until
channel change is done. Run test.
3400 OUTPUT Uut;”MEAS:BET:BERR:RATIO1?” !Read bit error test
result
3410 ENTER Uut;Ber1(Arcount,Rxcount)
3420 Ber1(Arcount,Rxcount)=Ber1(Arcount,Rxcount)/10000 !Convert from ppm to
%
3430 NEXT Arcount
3440 NEXT Rxcount
3450 OUTPUT Uut;”RFG:AMPL1 “;Bchpwr !Reset downlink to
normal power
3460 !
3470
!================================================================================
3480 !