User`s guide
2-27
GPIB Tutorial and Examples
Program 1
3950 REPEAT !to clear the call
3960 Time=Time+1
3970 WAIT 1
3980 OUTPUT Uut;”CELL:CALL:STATUS:STATE?” !Check the call status
3990 ENTER Uut;Status$
4000 UNTIL Status$=”””INACTIVE””” OR Time>30 !Call status will go
to inactive when the
4010 IF Time>30 THEN !mobile has cleared
4020 Errcount=Errcount+1
4030 Error$(Errcount)=”Mobile failed to end call” !Log an error if the
mobile fails to clear
4040 GOTO Timeflag !and go to the timeout
code
4050 CALL Sub_syserror(Uut,Error$(*),Errcount) !Check for any
Agilent 8922M/S logged errors
4060 END IF
4070 OUTPUT Uut;”CELL:CALL:TCH:ARFCN “;Dsparfcn(1) !Reset the ARFCN and
mobile Tx level ready
4080 OUTPUT Uut;”CELL:MS:TLEV “;Dsppwr(1) !to begin testing the
next phone
4090
!===================================================================================
4100 !
4110 Clock(3)=TIMEDATE-Clock(3) !Stop the call clearing
timer
4120 !
4130
!====================================================================================
4140 !
4150 !PRINT MEASUREMENT RESULTS
4160 !
4170 CALL
Sub_printit(Fparfcn(*),Fppwr(*),Fpwrmeas(*),Null(*),Null(*),Null(*),Null(*),Nullst$(*
),Numfparfcn,Numfppwr,Message$(3),Message$(4),Emptyst$,Empty)
4180 CALL
Sub_printit(Dsparfcn(*),Dsppwr(*),Slpwr(*),Pkpher(*),Rmspher(*),Frer(*),Null(*),Mask$
(*),Numdsparfcn,Numdsppwr,Message$(5),Message$(6),Emptyst$,Empty)
4190 CALL
Sub_printit(Berarfcn(*),Berpwr(*),Ber1(*),Rxqual(*),Rxlev(*),Txtim(*),Null(*),Nullst$
(*),Numberarfcn,Numberpwr,Message$(7),Message$(8),Emptyst$,Empty)
4200 !
4210
!====================================================================================
4220 !
4230 !PRINT TEST TIMES AND ERROR MESSAGES
4240 !
4250 !
4260 FOR X=1 TO 3
4270 PRINT Message$(X+9);DROUND(Clock(X),4);Message$(9)
4280 NEXT X
4290 PRINT
4300 PRINT
4310 IF Errcount=0 THEN
4320 Errcount=1
4330 Error$(1)=”No Errors”
4340 END IF
4350 FOR X=1 TO Errcount
4360 PRINT Error$(X)
4370 NEXT X
4380 Errcount=0
4390 !
4400
!=================================================================================
4410 !
4420 !LOOP IF ANOTHER PHONE IS TO BE TESTED
4430 !
4440 PRINT Message$(2)
4450 INPUT Answer$