User`s guide

2-23
GPIB Tutorial and Examples
Program 1
2200 OUTPUT Uut;”CELL:CALL:STATUS:STATE?” !Check the call status
for connected
2210 ENTER Uut;Status$
2220 UNTIL Status$=”””CONNECTED””” OR Time>Maxtime
2230 IF Time>Maxtime THEN
2240 Errcount=Errcount+1
2250 Error$(Errcount)=”Call could not be established”
2260 GOTO Timeflag !If wait too long,
goto timeout code
2270 END IF
2280 CALL Sub_syserror(Uut,Error$(*),Errcount) !Check for any errors
logged
2290 !
2300
!====================================================================================
2310 !
2320 Clock(1)=TIMEDATE-Clock(1) !End call set up timer
2330 Clock(2)=TIMEDATE !Start measurement timer
2340 !
2350
!====================================================================================
=
2360 !
2370 !PERFORM DSP MEASUREMENTS
2380 !
2390 OUTPUT Uut;”DISP DSP” !Return to the DSP
amplitude main screen
2400 FOR Txcount=1 TO Numdsppwr !Outer loop for Tx
levels
2410 Txlev=Dsppwr(Txcount) !Get Tx level from array
2420 OUTPUT Uut;”CELL:MS:TLEV”;Txlev !Program mobile’s Tx
level
2430 FOR Arcount=1 TO Numdsparfcn !Inner loop for ARFCN
2440 Arfcn=Dsparfcn(Arcount) !Get ARFCN from array
2450 OUTPUT Uut;”CELL:CALL:TCH:ARFCN “;Arfcn !Program link ARFCN
2460 Count=0 !Establish counter
for repeat measurements
2470 REPEAT !May need to repeat
if mobile not settled
2480 OUTPUT Uut;”TRIG:AST ‘ARM’” !Arm the DSP measure-
ment
2490 OUTPUT Uut;”MEASURE:DSPANALYZER:PHASE:ERROR:RMS?” !Read all the DSP
results: rms phase error
2500 ENTER Uut;Rmspher(Arcount,Txcount)
2510 !Note: program will stick here, waiting for input if mobile fails to provide a
valid signal to trigger
2520 ! the Agilent 8922M/S. The program will timeout. The timeout code dissarms
the Agilent 8922M/S trigger.
2530 OUTPUT Uut;”MEASURE:DSPANALYZER:PHASE:ERROR:PEAK?” !
peak phase error
2540 ENTER Uut;Pkpher(Arcount,Txcount)
2550 OUTPUT Uut;”MEASURE:DSPANALYZER:PHASE:ERROR:FRE-
QUENCY?”! frequency error
2560 ENTER Uut;Frer(Arcount,Txcount)
2570 OUTPUT Uut;”MEASURE:DSPANALYZER:MSUM?” !
power versus time mask
2580 ENTER Uut;Mask$(Arcount,Txcount)
2590 OUTPUT Uut;”MEASURE:DSPANALYZER:PTCP?” !
Tx power
2600 ENTER Uut;Slpwr(Arcount,Txcount)
2610 OUTPUT Uut;”RFAN:AMPL1?” !Read expected power
level to compare with
2620 ENTER Uut;Anlevel !measured and +/-3dB
allowed range
2630 OUTPUT Uut;”MEASURE:DSPANALYZER:SSTATUS?” !Check for any DSP
measurement errors
2640 ENTER Uut;Sstatus$