User`s guide

2-37
GPIB Tutorial and Examples
Program 2
4040 Time=0 !Agilent 8922M/S is
waiting for a report, after a SACCH
4050 REPEAT !reset it returns -1
4060 WAIT .3 !Pause. SACCH is a
low bandwidth channel.
4070 Time=Time+1
4080 OUTPUT Uut;”MEAS:CELL:SACCH:PARTIAL:RQU?” !Read the SACCH report
from the mobile
4090 ENTER Uut;Rxqualsettle !-1 is returned if
Agilent 8922M/S is still waiting
4100 UNTIL Time>7 OR Rxqualsettle<>-1 !for the report
4110 IF Rxqualsettle<=4 THEN !If RxQual is less
than 4, it’s good enough to
4120 Instance=Instance+1 !continue. The program
checks for more than
4130 ELSE !3 consecutive reports
at RxQual 4 or less to
4140 Instance=0 !be be sure the mobile
has stabalized. The
4150 END IF !mobile may return up
to 2 reports at the old
4160 UNTIL Count>20 OR Instance>3 !level, before it
recognizes the input level
4170 IF Count>20 OR Rxqualsettle=-1 THEN !change
4180 Errcount=Errcount+1 !If RxQual does not
stabalize, report an error
4190 Error$(Errcount)=”Mobile receiver AGC did not respond to downlink level
change”
4200 END IF
4210 FOR Arcount=1 TO Numberarfcn !Inner loop for BER
test ARFCN
4220 Arfcn=Berarfcn(Arcount) !Get ARFCN from array
4230 OUTPUT Uut;”CELL:CALL:TCH:ARFCN “;Arfcn !Request channel
assignment. Agilllent 8922M/S will hold
4240 OUTPUT Uut;”TRIG:BET:MODE ‘RUN’” !off BER test until
channel change is done. Run test.
4250 OUTPUT Uut;”MEAS:CELL:SACCH:RESET” !While BER test is
running, test SACCH reports
4260 Rxlev(Arcount,Rxcount)=-1 !Clear old reports
4270 Time=0
4280 REPEAT !Loop and wait for
SACCH report. -1 is returned
4290 WAIT .3 !when HP 8922M/S is
waiting for report
4300 Time=Time+1
4310 OUTPUT Uut;”MEAS:CELL:SACCH:PARTIAL:RLEV?” !Read RxLev
4320 ENTER Uut;Rxlev(Arcount,Rxcount)
4330 OUTPUT Uut;”MEAS:CELL:SACCH:PARTIAL:RQU?” !Read RxQual
4340 ENTER Uut;Rxqual(Arcount,Rxcount)
4350 OUTPUT Uut;”MEAS:CELL:MS:TERR?” !Also read uplink
timing error
4360 ENTER Uut;Txtim(Arcount,Rxcount)
4370 UNTIL Time>7 OR Rxlev(Arcount,Rxcount)<>-1 !Try again if SACCH
report not ready
4380 OUTPUT Uut;”MEAS:BET:BERR:RATIO1?” !Read bit error test
result
4390 ENTER Uut;Ber1(Arcount,Rxcount)
4400 Ber1(Arcount,Rxcount)=Ber1(Arcount,Rxcount)/10000 !Convert from ppm to
%
4410 NEXT Arcount
4420 NEXT Rxcount
4430 OUTPUT Uut;”RFG:AMPL1 “;Bchpwr !Reset downlink to
normal power
4440 !
4450
!================================================================================
4460 !
4470 Clock(2)=TIMEDATE-Clock(2) !Stop measurement timer