Comprehensive Program Example for AT Test (based on MCTAP test data connection)

Comprehensive Program Example for AT Test (based on MCTAP test data connection)

Last updated: July 23, 2008

 
10 !
20 !******************************************************************************
30 ! E1966A Comprehensive Programming Example - Rel B Subtype 3 Physical Layer
40 ! Revision: July 16, 2008
50 !
60 ! This program is for subtype 3 physical layer tests.
70 ! Firstly, it connects 2 test sets to establish a multi-carrier environment.
80 ! Then It opens an RMCTAP connection with a 1xEV-DO Access Terminal and
90 ! measures waveform quality, maximum power, minimum power,
100 ! TX spurious emissions, TROLPC, and range of open loop power.
110 ! At last, it moves to an FMCTAP connection and measures receiver sensitivity,
120 ! receiver dymanic range, and demodulation of traffic channel in AWGN.
130 !
140 ! The simple test executive allows you to set the test sequence by using gosubs
150 ! to call subroutines for each test.
160 !
170 ! You may un-comment handoffs and test subroutine calls and perform the
180 ! tests at various channels as needed.
190 !******************************************************************************
200 !
210 !***Initialize program variables***
220 !
230 OPTION BASE 1
240 !
250 COM Testset_main,Testset_aux1    ! Declare Test sets
260 COM Result_file$[150]            ! Declare common variables
270 COM /File/Openfile_flag
280       ! Results file open flag,
290       ! 1=Open a results file, 0=No results file opened
300       ! Results file is stored under C:\Results\current date
310 !
320 DIM Pass_fail_m$[40]                 ! Declare Pass or Fail indication string of the main unit
321 DIM Pass_fail_a$[40]                 ! Declare Pass or Fail indication string of the main unit
330 DIM Sector_id$[40]                 ! Declare Sector ID string
340 DIM Awgn_per_data$(1,3)[20]
350       ! Declare array to hold data AWGN PER test
360 !
370 Testset_main=714
380       ! Set "Testst_main" to GPIB address of test set
390 Testset_aux1=715
400       ! Set "Testst_aux1" to GPIB address of test set
410 !
420 !
430 CLEAR SCREEN                       ! Clear the PC display
440 !
450 !***Set up GPIB timeout***
460 !
470 ON TIMEOUT 7,30 CALL Timeout
480       ! Call "Timeout" routine after 20 seconds of GP-IB hang-up
490 !
500 !**************************************************************************
510 ! STEP 1: SET UP THE TEST SET
520 !**************************************************************************
530 !
540 !***Turn on GPIB debugger.  Comment out when done debugging program***
550 !
560 OUTPUT Testset_main;"SYST:COMM:GPIB:DEB:STAT ON"
570 OUTPUT Testset_aux1;"SYST:COMM:GPIB:DEB:STAT ON"
580       ! Turn debug state on
590 !
600 !***Set system path loss values.  Include cable and coupler losses.***
610 !
620 Loss_frequency$=" 800 MHZ,2000 MHZ"
630       ! Set frequencies for amplitude offset (path loss)
640 Expected_loss$=" -1.5,-1.5"
650       ! Set path loss at frequencies specified
660 !
670 OUTPUT Testset_main;"SYSTEM:BEEPER:STATE OFF"
680 OUTPUT Testset_aux1;"SYSTEM:BEEPER:STATE OFF"
690       ! Turn Off System Beeper
700 !
710 !**************************************************************************
720 ! STEP 2: CONFIGURE TEST SET AND ACCESS TERMINAL PARAMETERS
730 !**************************************************************************
740 !
750 !***Variable declarations for call setup. (AT-specific, change as needed)***
760 !
770 P_rev$="PRB"                       ! Set to protocol release B
780 Phy_sub$="SUBT3"                   ! Set to physical layer subtype 3
790 Band$="USC"                        ! Set cell band
800 P_main_channel=450                 ! Set Main RF channel for access network
810 P_aux1_channel=500                 ! Set Aux1 RF channel for access network
820 Country_code=310                   ! Set Access Terminal Country Code
830 Subnet_mask=104                    ! Set Sector Subnet mask
840 At_max_power$="DBM23"              ! Set AT Maximum Power
850                                    ! (DBM8, DBM13, DBM18, DBM20, DBM23
860                                    !  DBM27, DBM28, DBM31, DBM33)
890       ! Set two unit IP address
900 Init_cell_power=-50
910       ! Set initial cell power for connection setup
920 C_main_chan=P_main_channel
930 C_aux1_chan=P_aux1_channel
940       ! Set the current channel to equal primary channel
950    !
960 !
970 !**************************************************************************
980 ! SIMPLE TEST EXECUTIVE
990 !**************************************************************************
1000 !
1010 !**************************************************************************
1020 ! STEP 1: SET UP THE TEST SET
1030 !**************************************************************************
1040 !
1050 GOSUB Preset_test_set
1060       ! End any current connection and preset test set
1070 GOSUB Set_path_loss
1080       ! Set path loss values into test set RF Offset Table
1090 !
1100 !**************************************************************************
1110 ! STEP 2: CONFIGURE TEST SET AND ACCESS TERMINAL PARAMETERS
1120 !**************************************************************************
1130 !
1140 GOSUB Set_call_parms               ! Set up Access Terminal parameters
1150 !
1160 !**************************************************************************
1170 ! STEP 3: CONNECT TEST SETS
1180 !**************************************************************************
1190 !
1200 GOSUB Conn_test_sets            ! Connect two test sets
1210 !
1220 !**************************************************************************
1230 ! STEP 4: SET MEASUREMENT PARAMETERS
1240 !**************************************************************************
1250 !
1260 GOSUB Set_up_meas
1270       ! Set all measurement triggering to single
1280 !
1290 !***Start test time***
1300 !
1310 GOSUB Start_time
1320 !
1330 !**************************************************************************
1340 ! STEP 5: MAKE A CONNECTION (Open a session and open an RMCTAP connection)
1350 !**************************************************************************
1360 !
1370 GOSUB Session_open
1380       ! Open a session with the AT and read AT parameters
1390 !
1400 !**************************************************************************
1410 !***Open results file***
1420 !
1430 Openfile_flag=1
1440 IF Openfile_flag THEN GOSUB Open_rslts_file
1450       ! Store results in text file, file name= hid+current time
1460 !
1470 !***Print ACCESS TERMINAL information***
1480 !
1490 Print_title("Access Terminal Information:")
1500 PRINT
1510 Print_res_str("Session Seed:",Sseed$)
1520 Print_res_str("Hardware ID Type:",Hid_type$)
1530 Print_res_str("Hardware ID Hex:",Hid_hex$)
1540 Print_res_str("Hardware ID Dec:",Hid_dec$)
1550 Print_title(" ")
1560 !**************************************************************************
1570 !
1580 GOSUB Rmctap_connect
1590        ! Open an RMCTAP connection
1600 !
1610 !***Hand off to first channel to be tested***
1620 !
1630       Handoff_band$="USC"
1640       ! Only specify handoff band when performing interband HO
1650       Hand_main_chan=400
1660       Hand_aux1_chan=510
1670       ! Hand off to "low" channel for test
1680       GOSUB Handoff
1690       ! Hand off to the handoff band and channel specified
1700 !
1710 !**************************************************************************
1720 ! STEP 6: INITIATE AND FETCH TX MEASUREMENTS
1730 !**************************************************************************
1740 !
1750  !GOSUB Waveform_qual          ! Test waveform quality
1760 GOSUB Max_pow_spur            ! Test max power and TX spurious emissions
1770  !GOSUB Min_pow                ! Test min power
1780  !GOSUB Time_resp_olp          ! Test time response of open loop power
1790 GOSUB Rng_open_loop           ! Test range of open loop output power
1800 !
1810 !**************************************************************************
1820 ! STEP 7: RECONFIGURE TEST SET AND AT PARMS (Change to an FMCTAP connection)
1830 !**************************************************************************
1840 !WAIT .2
1850 GOSUB Fmctap_connect                  ! Change to an FMCTAP connection
1860 !
1870 !**************************************************************************
1880 ! STEP 8: INITIATE AND FETCH RX MEASUREMENTS
1890 !**************************************************************************
1900 !
1910 GOSUB Sensitivity             ! Test receiver sensitivity
1920 GOSUB Dynamic_range           ! Test dynamic range
1930 ! GOSUB Traf_per_awgn          ! Test demod of traffic channel in AWGN
1940 !
1950 !**************************************************************************
1960 ! STEP 9: RECONFIGURE TEST SET AND ACCESS TERMINAL CONNECTION PARAMETERS
1970 !         (Perform a handoff to a new channel and repeat testing as needed)
1980 !**************************************************************************
1990 !
2000 !      GOSUB Rmctap_connect         ! Move to an RMCTAP connection
2010 !      Handoff_main_chan=900        ! Main unit hand off channel
2020 !      Handoff_aux1_chan=950        ! Aux1 unit hand off channel
2030 !      GOSUB Handoff
2040 !
2050 !      GOSUB Waveform_qual
2060 !      GOSUB Max_pow_spur
2070 !      GOSUB Min_pow
2080 !      GOSUB Time_resp_olp
2090 !      GOSUB Rng_open_loop
2100 !
2110 !      GOSUB Fmctap_connect         ! Move to an MCFTAP connection
2120 !
2130 !      GOSUB Sensitivity
2140 !      GOSUB Dynamic_range
2150 !      GOSUB Traf_per_awgn
2160 !
2170 !      GOSUB Rmctap_connect         ! Move to an RMCTAP connection
2180 !      Handoff_main_chan=530        ! Main unit hand off channel
2190 !      Handoff_aux1_chan=450        ! Aux1 unit hand off channel
2200 !      GOSUB Handoff
2210 !
2220 !      GOSUB Waveform_qual
2230 !      GOSUB Max_pow_spur
2240 !      GOSUB Min_pow
2250 !      GOSUB Time_resp_olp
2260 !      GOSUB Rng_open_loop
2270 !
2280 !      GOSUB Fmctap_connect         ! Move to an FMCTAP connection
2290 !
2300 !      GOSUB Sensitivity
2310 !      GOSUB Dynamic_range
2320 !      GOSUB Traf_per_awgn
2330 !
2340 !**************************************************************************
2350 ! STEP 10: END THE CONNECTION
2360 !**************************************************************************
2370 GOSUB End_exec
2380 End_exec:!
2390 GOSUB End_connection                        ! End the current connection
2400 GOSUB End_time                              ! Stop test time
2410 GOTO End_program
2420       ! Jump to end of program. Do not remove this line.
2430       ! Must jump over the sub-routines to the end.
2440                                              !
2450 !**************************************************************************
2460 !
2470 !**************************************************************************
2480 ! BEGINNING OF SUBROUTINES
2490 !**************************************************************************
2500 !
2510  Preset_test_set:!
2520 !*******************************************************************
2530 ! Subroutine: Preset the test set (Step 1: Set Up the Test Set)
2540 !*******************************************************************
2550 !
2560 OUTPUT Testset_main;"*RST"
2570 OUTPUT Testset_aux1;"*RST"
2580       ! Full preset test set
2590 OUTPUT Testset_main;"*OPC?"
2600 ENTER Testset_main;Opc$
2610 RETURN
2620 !
2630  Set_path_loss:!
2640 !*******************************************************************
2650 ! Subroutine: Set path loss values (Step 1: Set Up the Test Set)
2660 !*******************************************************************
2670 !
2680 OUTPUT Testset_main;"SYST:CORR:FREQ ";Loss_frequency$
2691 OUTPUT Testset_aux1;"SYST:CORR:FREQ ";Loss_frequency$
2692       ! Set the frequencies for amplitude offset
2700 OUTPUT Testset_main;"SYST:CORR ";Expected_loss$
2711 OUTPUT Testset_aux1;"SYST:CORR ";Expected_loss$
2712       ! Set the amplitude offsets for above frequencies
2720 RETURN
2730 !
2740  Set_call_parms:!
2750 !*******************************************************************
2760 ! Subroutine: Step 2: Configure Test Set and Access Terminal Parameters
2770 !*******************************************************************
2780 !
2790 DISP "Setting up Test Set and Access Terminal Parameters"
2800 !
2810 OUTPUT Testset_main;"CALL:PROTocol ";P_rev$
2820       ! Set protocol release B
2830 OUTPUT Testset_main;"CALL:PROTocol:PRB:PLAYer ";Phy_sub$
2840       ! Set physical layer subtype 3 for Release B
2850 OUTPUT Testset_main;"CALL:BAND ";Band$
2860       ! Set Cell Band
2870 OUTPUT Testset_main;"CALL:CHAN ";P_main_channel
2880       ! Set main RF Channel for selected Cell Band
2890 OUTPUT Testset_main;"CALL:MCARrier:AUXiliary:CHANnel:DIGital856 ";P_aux1_channel
2900       ! Set aux1 RF Channel for selected Cell Band
2910 OUTPUT Testset_main;"CALL:POW ";Init_cell_power
2920       ! Set and turns on Cell Power for connection
2921 OUTPUT Testset_aux1;"CALL:POW ";Init_cell_power
2922       ! Set and turns on Cell Power for connection
2930 OUTPUT Testset_main;"CALL:MS:POWER:MAXIMUM ";At_max_power$
2940       ! Set AT maximum expected power
2950 OUTPUT Testset_main;"CALL:MCCODE ";Country_code
2960       ! Set AT country code specified
2970 OUTPUT Testset_main;"CALL:PARAMETER:SECTOR:SMASK ";Subnet_mask
2980       ! Set MS subnet mask specified
2990 RETURN
3000 !
3010  Conn_test_sets:!
3020 !*******************************************************************
3030 ! Subroutine: Step 3: Connect two test sets
3040 !*******************************************************************
3050 !
3060 OUTPUT Testset_main;"SYSTem:COMMunicate:LAN:ADDRess?"
3070 ENTER Testset_main;Main_ip_addr$
3080 OUTPUT Testset_aux1;"SYSTem:COMMunicate:LAN:ADDRess?"
3090 ENTER Testset_aux1;Aux1_ip_addr$
3100          ! Get IP address of two test sets
3110 OUTPUT Testset_main;"SYSTem:COMMunicate:LAN:EXTernal:ADDRess ";Aux1_ip_addr$
3120 OUTPUT Testset_aux1;"SYSTem:COMMunicate:LAN:EXTernal:ADDRess ";Main_ip_addr$
3130          ! Set External IP address of two test sets
3131 OUTPUT Testset_main;"SYSTem:COMMunicate:LAN:EXTernal:PERM ON"
3132 OUTPUT Testset_aux1;"SYSTem:COMMunicate:LAN:EXTernal:PERM ON"
3133 !
3134 !
3135 OUTPUT Testset_main;"CALL:MCARrier:CONFigure:CARRier MAIN"
3136          ! Set main test sets
3140 OUTPUT Testset_main;"CALL:MCARrier:MUNit:SETup"
3150          ! Automatic setup, connect two test sets
3151 WAIT 2
3160 RETURN
3170 !
3180  Set_up_meas:!
3190 !*******************************************************************
3200 ! Subroutine: Set all measurement triggers to single
3210 !             (Step 4: Set Meas Parms)
3220 !*******************************************************************
3230 !
3240 OUTPUT Testset_main;"SETUP:CONTINUOUS:OFF"
3250       ! Set all measurements to single trigger
3260 OUTPUT Testset_aux1;"SETUP:CONTINUOUS:OFF"
3270       ! Set all measurements to single trigger
3280 RETURN
3290 !
3300  Session_open:!
3310 !*******************************************************************
3320 ! Subroutine: Open session
3330 !*******************************************************************
3340 !
3350 OUTPUT Testset_main;"CALL:DCONNECTED:TIMEOUT 30"
3360       ! Set connection change detector timeout
3370 OUTPUT Testset_main;"CALL:DCONNECTED:ARM"
3380       ! Arm the connection state change detector
3390 !
3400 BEEP
3410 LINPUT "Connect AT and power on, press ENTER when session open",Keyboard$
3420 DISP "Verifying session is open"
3430 !
3440 OUTPUT Testset_main;"CALL:SOPEN?"
3450       ! Query the session open state
3460 ENTER Testset_main;Session_open
3470 IF Session_open=0 THEN
3480       ! If session did not open then end program
3490 BEEP
3500 Print_title("Access Terminal did not open session, check settings")
3510 Print_title("Terminating Testing")
3520 GOTO End_program
3530 END IF
3540 !
3550 DISP "Session Open"
3560 !
3570 !***Read ACCESS TERMINAL information***
3580 !
3590 OUTPUT Testset_main;"CALL:MS:REP:SSEED?"
3600 ENTER Testset_main;Sseed$
3610 OUTPUT Testset_main;"CALL:MS:REP:HID:TYPE?"
3620 ENTER Testset_main;Hid_type$
3630 OUTPUT Testset_main;"CALL:MS:REP:HID:HEX?"
3640 ENTER Testset_main;Hid_hex$
3650 OUTPUT Testset_main;"CALL:MS:REP:HID:DEC?"
3660 ENTER Testset_main;Hid_dec$
3670 !
3680 RETURN
3690 !
3700  Rmctap_connect:!
3710 !*******************************************************************
3720 ! Subroutine: Open an RMCTAP connection
3730 !*******************************************************************
3740 !
3750 DISP "Opening (or Moving to) an RETAP Connection"
3760 !
3770 IF NOT FNConnected THEN
3780 DISP "Connection is not currently open"
3790           ! If the state is NOT connected, then see if it is session open
3800 !
3810 IF NOT FNSession_check THEN
3820           ! If the state is NOT session open, then end program
3830 Print_title("Session is not currently open")
3840 Print_title("Ending Testing")
3850 GOTO End_program
3860 END IF
3870           ! If the state is session open, then change to RMCTAP and
3880           ! open a connection
3890 DISP "Session is open, opening an RMCTAP connection now"
3900 !
3910 OUTPUT Testset_main;"CALL:MCARrier:APPLication:TAPP REVerse"
3920           ! Set application type to RMCTAP (for AT transmitter testing)
3930 OUTPUT Testset_main;"CALL:APPLication:DATA:PACKet BIT256"
3940           ! Set Reverse data packet size to 256 bits.
3950 OUTPUT Testset_main;"CALL:MCARrier:AUXiliary:APPLication:DATA:PACKet BIT256"
3960           ! Set aux1 channel Reverse data packet size to 256 bits.
3970 GOSUB Start_data
3980 !
3990 ELSE
4000 DISP "Connection is currently open, changing to RMCTAP"
4010           ! If state is connected, then change to RMCTAP
4020 OUTPUT Testset_main;"CALL:MCARrier:APPLication:TAPP REVerse"
4030           ! Set application type to RMCTAP (for AT transmitter testing)
4040 OUTPUT Testset_main;"CALL:APPLication:DATA:PACKet BIT256"
4050           ! Set main channel Reverse data packet size to 256 bits.
4060 OUTPUT Testset_main;"CALL:MCARrier:AUXiliary:APPLication:DATA:PACKet BIT256"
4070           ! Set aux1 channel Reverse data packet size to 256 bits.
4080 !
4090           !IF NOT FNConnected THEN
4100           ! This additional loop is only necessary if Limited TAP is On
4110               !DISP "Connection was closed when Application changed"
4120               ! If the state is NOT connected, then see if session open
4130               !IF NOT FNSession_check THEN
4140               ! If the state is NOT session open, then end program
4150                   !Print_title("Session is not currently open")
4160                   !Print_title("Ending Testing")
4170                   !GOTO End_program
4180               !END IF
4190               ! If the state is session open, then re-open a connection
4200               !DISP "Session is open, re-opening an RETAP connection now"
4210            !GOSUB Start_data
4220           !END IF
4230 !
4240 DISP "RMCTAP Connection Open"
4250 !
4260 END IF
4270 !
4280 RETURN
4290 !
4300  Fmctap_connect:!
4310 !*******************************************************************
4320 ! Subroutine: Open an FMCTAP connection
4330 !*******************************************************************
4340 !
4350 DISP "Opening (or Moving to) an FMCTAP Connection"
4360 !
4370 IF NOT FNConnected THEN
4380 DISP "Connection is not currently open"
4390           ! If the state is NOT connected, then see if it is session open
4400 !
4410 IF NOT FNSession_check THEN
4420           ! If the state is NOT session open, then end program
4430 Print_title("Session is not currently open")
4440 Print_title("Ending Testing")
4450 GOTO End_program
4460 END IF
4470           ! If the state is session open, then change to FMCTAP and
4480           ! open a connection
4490 DISP "Session is open, opening an FMCTAP connection now"
4500 !
4510 OUTPUT Testset_main;"CALL:MCARrier:APPLication:TAPP FORWard"
4520           ! Set application type to FMCTAP  (for AT Receiver testing)
4530 OUTPUT Testset_main;"CALL:APPLication:PLAYer3:TRAFfic:FORMat 4,1024,2,128"
4540           ! Set PL3 main channel F-Traffic transmission format resulting in 307.2kbps,2slots
4550 OUTPUT Testset_main;"CALL:MCARrier:AUXiliary:APPLication:PLAYer3:TRAFfic:FORmat 4,1024,2,128"
4560           ! Set PL3 aux1 channel F-Traffic transmission format resulting in 307.2kbps,2slots
4570 GOSUB Start_data
4580 !
4590 ELSE
4600 DISP "Connection is currently open, changing to FMCTAP"
4610           ! If state is connected, then change to FMCTAP
4620 OUTPUT Testset_main;"CALL:MCARrier:APPLication:TAPP FORWard"
4630           ! Set application type to FMCTAP  (for AT Receiver testing)
4640 OUTPUT Testset_main;"CALL:APPLication:PLAYer3:TRAFfic:FORMat 4,1024,2,128"
4650           ! Set PL3 main channel F-Traffic transmission format resulting in 307.2kbps,2slots
4660 OUTPUT Testset_main;"CALL:MCARrier:AUXiliary:APPLication:PLAYer3:TRAFfic:FORmat 4,1024,2,128"
4670           ! Set PL3 aux1 channel F-Traffic transmission format resulting in 307.2kbps,2slots
4680 !
4690 IF NOT FNConnected THEN
4700 DISP "Connection was closed when Application changed"
4710               ! If the state is NOT connected, then see if session open
4720 IF NOT FNSession_check THEN
4730               ! If the state is NOT session open, then end program
4740 Print_title("Session is not currently open")
4750 Print_title("Ending Testing")
4760 GOTO End_program
4770 END IF
4780               ! If the state is session open, then re-open a connection
4790 DISP "Session is open, re-opening an FMCTAP connection now"
4800 GOSUB Start_data
4810 END IF
4820 !
4830 DISP "FMCTAP Connection Open"
4840 !
4850 END IF
4860 !
4870 RETURN
4880 !
4890  Start_data:!
4900 !*******************************************************************
4910 ! Subroutine: Start data connection and verify it has connected
4920 !*******************************************************************
4930 !
4940 OUTPUT Testset_main;"CALL:DCONNECTED:TIMEOUT 10"
4950       ! Set connection change detector timeout
4960 OUTPUT Testset_main;"CALL:DCONNECTED:ARM"
4970       ! Arm the connection state change detector
4980 OUTPUT Testset_main;"CALL:FUNCTION:DATA:START"
4990       ! Page the access terminal
5000 OUTPUT Testset_main;"CALL:DCONNECTED?"
5010       ! Query the connection status
5020 ENTER Testset_main;Data_started
5030 !
5040 IF Data_started=0 THEN
5050 Print_title("Data connection could not be opened")
5060 Print_title("Ending Testing")
5070 GOTO End_program
5080 END IF
5090 !
5100 DISP "Data Connection Open"
5110 !
5120 RETURN
5130 !
5140  Handoff:!
5150 !*******************************************************************
5160 ! Subroutine: Set up and perform a hard handoff
5170 !*******************************************************************
5180 !
5190 !***Set up a hard handoff***
5200 !
5210 OUTPUT Testset_main;"CALL:SETUP:BAND ";Handoff_band$
5220       ! Specify the cell band to hand off to
5230 OUTPUT Testset_main;"CALL:SETUP:CHANNEL ";Hand_main_chan
5240       ! Specify the main channel number to hand off to
5250 OUTPUT Testset_main;"CALL:SETUP:MCARRIER:AUX:CARRIER:STATE ON"
5251 OUTPUT Testset_main;"CALL:SETUP:MCARRIER:AUX:CHANNEL:DIGital856 ";Hand_aux1_chan
5260       ! Specify the aux1 channel number to hand off to
5270 !
5280 !***Perform a hard handoff***
5290 !
5300 OUTPUT Testset_main;"CALL:HANDOFF"
5310       ! Initiate a hard handoff
5320 !
5330 IF NOT FNConnected THEN
5340       ! Verify connection is still open after handoff
5350 DISP "Handoff attempt failed, program stopped"
5360 GOTO End_program
5370 ELSE
5380 PRINT
5390 Print_results("Handoff completed to main channel: ",Hand_main_chan)
5391 Print_results("                  to aux1 channel: ",Hand_aux1_chan)
5400 PRINT "Call connected"
5410 PRINT
5420 C_main_chan=Hand_main_chan
5430 C_aux1_chan=Hand_aux1_chan
5440 Band$=Handoff_band$
5450 !
5460 END IF
5470 !
5480 RETURN
5490 !
8870 !
8880  Max_pow_spur: !
8890 !*******************************************************************
8900 ! Subroutine: Digital Average Power and
8910 !             TX Spurious Emissions Measurements For AT that support subtype 3
8920 !             4.3.4 Maximum RF Output Power
8930 !             4.4.1 Conducted Spurious Emissions (Test 2)
8940 !*******************************************************************
8950 !
8960 DISP "Measuring Maximum Power and TX Spurious Emissions"
8970 !
8980 !***Set up test parameters***
8990 !
9000 Ior=-60      !Ior=-60
9010              ! Set cell power for test
9020 9030 IF Band$="KPCS" OR Band$="USPCS" OR Band$="USPCs1900" OR Band$="IMT2000" THEN
9040       !
9050       ! Set open loop adjust for test
9060 Ol_adjust=84
9070 ELSE
9080 Ol_adjust=81
9090 END IF
9100 !OUTPUT Testset_main;"CALL:MCAR:AUX:CHAN:DIGITAL856 ";C_aux1_chan
9110 OUTPUT Testset_main;"CALL:APPLication:DATA:PACKet BIT4096"
9120       ! Set R-Data Packet size to 4096 bits on the main unit.
9130 OUTPUT Testset_main;"CALL:MCAR:AUX:APPLication:DATA:PACKet BIT4096"
9140       ! Set R-Data Packet size to 4096 bits on the aux unit 1.
9150 !OUTPUT Testset_main;"CALL:APPLication:DATA:TRANsmission HCAPacity"
9160       ! Set R-Data transmission mode to high capacity.
9170 !OUTPUT Testset_main;"CALL:MS:T2Pilot:BIT4096:HCAPacity:TARGet 3"
9180       ! Set 4096 bits high capacity termination target to 4 subframes.
9190       ! It is required only if you've changed test set default value.
9200       ! NOTE:changing this parameter results in a session renegotiation,
9210       ! You should set this parameter prior to a data connection. Otherwise,
9220       ! you need to re-open the connection
9230 !OUTPUT Testset_main;"CALL:APPLication:TRAFfic:FORMat 4,1024,2,128"
9240       ! Set F-Traffic transmission format to 307.2 kbps (2 slots) on the main unit.
9250 !OUTPUT Testset_main;"CALL:MCAR:AUX:APPLication:PLAY3:TRAFfic:FORMat 4,1024,2,128"
9260       ! Set F-Traffic transmission format to 307.2 kbps (2 slots) on the aux unit 1.
9270 !OUTPUT Testset_main;"CALL:APPLication:ACKChannel:BFMAttribute 1"
9280       ! Set Ack channel bit fixed mode attribute to On on the main unit.
9290 !OUTPUT Testset_main;"CALL:MCAR:AUX:APPLication:ACKChannel:BFMAttribute 1"
9300       ! Set Ack channel bit fixed mode attribute to On on the aux unit 1.
9310       !
9320 OUTPUT Testset_main;"CALL:APAR:POWER:OLADJUST ";Ol_adjust
9330       ! Set Open Loop Adjust
9340 OUTPUT Testset_main;"CALL:APAR:PROBE:IADJUST 15"
9350       ! Set Probe Initial Adjust
9360 OUTPUT Testset_main;"CALL:APAR:PROBE:POWER:STEP 7.5"
9370       ! Set Probe Power Step
9380 WAIT 5
9390 !***Set up measurement parameters***
9400 !
9410 OUTPUT Testset_main;"SETUP:DAPOWER:TIMEOUT 1"
9420       ! Set DIGITAL Power timeout to 1 sec
9430 OUTPUT Testset_main;"SETUP:CTXS:TIMEOUT 5"
9440       ! Set TX Spur Emissions timeout to 5 sec
9441 OUTPUT Testset_main;"SETUP:CTXS:TCAS TEST2"
9442 !
9450 OUTPUT Testset_aux1;"SETUP:DAPOWER:TIMEOUT 1"
9460       ! Set DIGITAL Power timeout to 1 sec on the aux unit 1
9470 OUTPUT Testset_aux1;"SETUP:CTXS:TIMEOUT 5"
9480       ! Set TX Spur Emissions timeout to 5 sec on the aux unit 1
9490 OUTPUT Testset_aux1;"SETUP:CTXS:TCAS TEST2"
9500 !***Set test conditions***
9510 !
9520 OUTPUT Testset_main;"CALL:POW ";Ior
9521 OUTPUT Testset_aux1;"CALL:POW ";Ior
9530       ! Set Cell Power for Test
9540 OUTPUT Testset_main;"CALL:CLPCONTROL:REVERSE:MODE UP"
9550       ! Start transmission of All Up (0) power control bits
9560       !
9590 !OUTPUT Testset_aux1;"CALL:CLPCONTROL:REVERSE:MODE UP"
9600       ! Start transmission of All Up (0) power control bits
9610 WAIT 2
9620       ! Settling time to allow mobile power to slew up to maximum power
9630 !
9640 !***Initiate measurement on both the test sets***
9650 !
9660 OUTPUT Testset_main;"INITIATE:DAPOWER;CTXS"
9670       ! Initiate digital average power and
9680       ! TX spurious emissions measurements
9690 !
9700 OUTPUT Testset_aux1;"INITIATE:DAPOWER;CTXS"
9710       ! Initiate digital average power and
9720       ! TX spurious emissions measurements
9730 !
9740 !***Obtain measurement results of the main unit***
9750 LOOP
9760 OUTPUT Testset_main;"INIT:DONE?"
9770           ! Determine if a measurement is done
9780 ENTER Testset_main;Meas_done_m$
9790           ! Obtain measurement results as they are ready
9800 !
9810 SELECT Meas_done_m$
9820 CASE "DAP"
9830 OUTPUT Testset_main;"FETCh:DAPOWER?"
9840 ENTER Testset_main;Integrity_m,Avg_power_dbm_m
9850 CASE "CTXS"
9860 OUTPUT Testset_main;"FETCH:CTXS?"
9870 ENTER Testset_main;Ctxs_integ_m,Ctxs_pf_m,Low_adj_m,Up_adj_m,Low_alt_m,Up_alt_m
9880 END SELECT
9890 !
9900 EXIT IF Meas_done_m$="NONE"
9910       ! Exit loop when all measurements are complete
9920 END LOOP
9930       ! If Meas_done$="WAIT" then loop continues until "NONE"
9940 !
9950 Avg_power_dbw_m=Avg_power_dbm_m-30
9960       ! Convert dBm to dBW
9970 !
9980 SELECT Ctxs_pf_m
9990       ! Assign CTXS pass/fail results to a string
10000 CASE 0
10010 Pass_fail_m$="PASS"
10020 CASE 1
10030 Pass_fail_m$="FAIL"
10040 END SELECT
10050 !
10060 !***Obtain measurement results of the aux unit 1***
10070 !
10080 LOOP
10090 OUTPUT Testset_aux1;"INIT:DONE?"
10100           ! Determine if a measurement is done
10110 ENTER Testset_aux1;Meas_done_a$
10120           ! Obtain measurement results as they are ready
10130 !
10140 SELECT Meas_done_a$
10150 CASE "DAP"
10160 OUTPUT Testset_aux1;"FETCh:DAPOWER?"
10170 ENTER Testset_aux1;Integrity_a,Avg_power_dbm_a
10180 CASE "CTXS"
10190 OUTPUT Testset_aux1;"FETCH:CTXS?"
10200 ENTER Testset_aux1;Ctxs_integ_a,Ctxs_pf_a,Low_adj_a,Upp_adj_a,Low_alt_a,Upp_alt_a
10210 END SELECT
10220 !
10230 EXIT IF Meas_done_a$="NONE"
10240       ! Exit loop when all measurements are complete
10250 END LOOP
10260       ! If Meas_done$="WAIT" then loop continues until "NONE"
10270 !
10280 Avg_power_dbw_a=Avg_power_dbm_a-30
10290       ! Convert dBm to dBW
10300 !
10310 SELECT Ctxs_pf_a
10320       ! Assign CTXS pass/fail results to a string
10330 CASE 0
10340 Pass_fail_a$="PASS"
10350 CASE 1
10360 Pass_fail_a$="FAIL"
10370 END SELECT
10380 !
10390 !***Print Max Power Test Results of the two units***
10400 !
10410 Print_title("Max Power Test Results of the main unit:")
10420 PRINT
10430 Print_results("Channel/Band= ",C_main_chan,Band$)
10440 Print_results("Integrity indicator = ",Integrity_m,"")
10450 Print_results("Maximum Power dBm:",Avg_power_dbm_m,"dBm")
10460 Print_results("Maximum Power dBW:",Avg_power_dbw_m,"dBW")
10470 PRINT
10480 !
10490 Print_title("Max Power Test Results of the aux unit 1:")
10500 PRINT
10510 Print_results("Channel/Band= ",C_aux1_chan,Band$)
10520 Print_results("Integrity indicator = ",Integrity_s,"")
10530 Print_results("Maximum Power dBm:",Avg_power_dbm_s,"dBm")
10540 Print_results("Maximum Power dBW:",Avg_power_dbw_s,"dBW")
10550 PRINT
10560 !
10570 Print_title("Max Power Test Complete")
10580 PRINT
10590 PRINT
10600 !
10610 !***Print TX Spurious Test Results of the two units
10620 !
10630 Print_title("TX Spurious Test Results of the main unit:")
10640 PRINT
10650 Print_results("Channel/Band= ",C_main_chan,Band$)
10660 Print_results("Integrity indicator = ",Ctxs_inte_m,"")
10670 Print_res_str("Test Result: ",Pass_fail_m$)
10680 Print_results("Lower Adjacent Power",Low_adj_m,"dBm/1MHz")
10700 Print_results("Lower Alternate Power",Low_alt_m,"dBm/1MHz")
10710 !
10720 PRINT
10730 !
10740 !
10750 Print_title("TX Spurious Test Results of the aux unit 1:")
10760 PRINT
10770 Print_results("Channel/Band= ",C_aux1_chan,Band$)
10780 Print_results("Integrity indicator = ",Ctxs_integ_a,"")
10790 Print_res_str("Test Result: ",Pass_fail_a$)
10810 Print_results("Upper Adjacent Power",Upp_adj_a,"dBm/1MHz")
10830 Print_results("Upper Alternate Power",Upp_alt_a,"dBm/1MHz")
10840 PRINT
10860 !
10870 Print_title("TX Spurious Test Complete")
10880 PRINT
10890 PRINT
10900 !
10910 !***Post test clean up***
10920 !
10930 OUTPUT Testset_main;"CALL:CLPCONTROL:REVERSE:MODE ACTIVE"
10940       ! Return to active power control bits
10950 OUTPUT Testset_main;"CALL:POW ";Init_cell_power
10951 OUTPUT Testset_aux1;"CALL:POW ";Init_cell_power
10960       ! Set cell power back to initial level
10970       ! Do this before reconfiguring other parms so signaling
10980 OUTPUT Testset_main;"CALL:APAR:PROBE:IADJUST 0"
10990       ! Set Access parameters for test
11000 OUTPUT Testset_main;"CALL:APAR:PROBE:STEP:COUNT 5"
11010       ! Set Access paramters for test
11020 OUTPUT Testset_main;"CALL:APAR:PROBE:POWER:STEP 1"
11030       ! Set Access paramters for test
11040 OUTPUT Testset_main;"INIT:DAP:OFF"
11041 OUTPUT Testset_aux1;"INIT:DAP:OFF"
11050       ! Turn digital ave power off
11060 OUTPUT Testset_main;"INIT:CTXS:OFF"
11061 OUTPUT Testset_aux1;"INIT:CTXS:OFF"
11070       ! Turn TX spurious emissions off
11080 !OUTPUT Testset_main;"CALL:MCAR:AUX:CHAN:DIGITAL856 ";P_aux1_channel  
11250 !
11260 DISP ""
11270 !
11280 RETURN
11300 !
11310 !
11320 !
11330  Rng_open_loop:!
11340 !
11350 !*******************************************************************
11360 ! Subroutine: Access Probe Power Measurement (can only be performed on the main unit)
11370 !             4.3.1 Range of Open Loop Output Power
11380 !*******************************************************************
11390 !
11400 DISP "Testing Range of Open Loop Power"
11410 !
11420 !***End current connection***
11430 !
11440 IF FNConnected THEN
11450       ! Check to see if currently connected
11460 GOSUB End_connection
11470 END IF
11480 !
11490 !***Verify session is open***
11500 !
11510 IF NOT FNSession_check THEN
11520       ! Check to see if session open
11530 Print_title("Session must be open during Range of Open Loop")
11540 Print_title("Ending Testing")
11550 GOTO End_program
11560 END IF
11570 !
11580 !***Set up test parameters***
11590 !
11600 Ior1=-25                           ! First level for test
11610 Ior2=-65                           ! Second level for test
11620 Ior3=-93.5
11630       ! Ior for test 3 Band Class 0, AT Class III
11640 Ol_adjust=78
11650       ! Set Open Loop Adjust for Band Class 0
11660 !
11670 OUTPUT Testset_main;"CALL:APAR:POWER:OLADJUST ";Ol_adjust
11680       ! Set Open Loop Adjust
11690 OUTPUT Testset_main;"CALL:APAR:PREAMBLE:LENGTH 7"
11700       ! Set preamble length in frames
11710 OUTPUT Testset_main;"CALL:APAR:PROBE:SEQUENCE 1"
11720       ! Set Probe Sequence Max
11730       ! This must be done BEFORE call limit mode is turned on
11740 OUTPUT Testset_main;"CALL:APAR:PROBE:POWER:STEP 0"
11750       ! Set Probe Power Step
11760 !
11770 !***Set up measurement parameters***
11780 !
11790 OUTPUT Testset_main;"SETUP:CAPP:TIMEOUT 10"
11800       ! Set access probe power timeout to 10 seconds
11810 !
11820 !***Set test conditions***
11830 !
11840 OUTPUT Testset_main;"CALL:CONNECTED:LIMIT:STATE 1"
11850       ! Turn on call limit mode so connection is not established
11860       ! This must be done AFTER probe sequence max is set
11870 !
11880 !***Obtain measurement results***
11890 !
11900 OUTPUT Testset_main;"CALL:POW ";Ior1
11910       ! Set cell power for test 1
11920 WAIT .1
11930       ! Settling time for access terminal output power to slew
11940 OUTPUT Testset_main;"CALL:FUNCTION:DATA:START"
11950       ! Page access terminal
11960 OUTPUT Testset_main;"READ:CAPP?"
11970       ! Read access probe power
11980 ENTER Testset_main;Integrity1,Test1
11990 OUTPUT Testset_main;"CALL:FUNCTION:DATA:STOP"
12000       ! Stop data connection paging before repaging at next level
12010 !
12020 OUTPUT Testset_main;"CALL:POW ";Ior2
12030       ! Set cell power for test 2
12040 WAIT .1
12050       ! Settling time for mobile output power to slew
12060 OUTPUT Testset_main;"CALL:FUNCTION:DATA:START"
12070       ! Page access terminal
12080 OUTPUT Testset_main;"READ:CAPP?"
12090       ! Read access probe power
12100 ENTER Testset_main;Integrity2,Test2
12110 OUTPUT Testset_main;"CALL:FUNCTION:DATA:STOP"
12120       ! Stop data connection paging before repaging at next level
12130 !
12140 OUTPUT Testset_main;"CALL:POW ";Ior3
12150       ! Set cell power for test 3
12160 WAIT .1
12170       ! Settling time for mobile output power to slew
12180 OUTPUT Testset_main;"CALL:FUNCTION:DATA:START"
12190       ! Page access terminal
12200 OUTPUT Testset_main;"READ:CAPP?"
12210       ! Read access probe power
12220 ENTER Testset_main;Integrity3,Test3
12230 OUTPUT Testset_main;"CALL:FUNCTION:DATA:STOP"
12240       ! Stop data connection paging
12250 !
12260 !***Print measurement results***
12270 !
12280 Print_title("Range of Open Loop Power Control Results on the main unit:")
12290 PRINT
12300 Print_results("Channel/Band= ",C_main_chan,Band$)
12310 Print_results("Integrity indicator = ",Integrity1,"")
12320 Print_results("Test 1 @ "&VAL$(Ior1)&" dBm:",Test1,"dBm/1.23 MHz")
12330 Print_results("Integrity indicator = ",Integrity2,"")
12340 Print_results("Test 2 @ "&VAL$(Ior2)&" dBm:",Test2,"dBm/1.23 MHz")
12350 Print_results("Integrity indicator = ",Integrity1,"")
12360 Print_results("Test 3 @ "&VAL$(Ior3)&" dBm:",Test3,"dBm/1.23 MHz")
12370 PRINT
12380 Print_title("Range of Open Loop Power Test Complete")
12390 PRINT
12400 PRINT
12410 !
12420 !***Post test clean up***
12430 !
12440 OUTPUT Testset_main;"CALL:CONNECTED:LIMIT:STATE 0"
12450       ! Turn off call limit mode
12460       ! Must do BEFORE can change probe max sequence
12470 WAIT .5
12480 OUTPUT Testset_main;"CALL:POW ";Init_cell_power
12490       ! Set Cell Power to default
12500       ! Do this before reconfiguring other parms so signaling
12510       ! is successful (don't want cell power too low for signaling)
12520 OUTPUT Testset_main;"CALL:APAR:PREAMBLE:LENGTH 7"
12530       ! Set preamble length in frames
12540 OUTPUT Testset_main;"CALL:APAR:PROBE:IADJUST 0"
12550       ! Set Probe Initial Adjust
12560 OUTPUT Testset_main;"CALL:APAR:PROBE:STEP:COUNT 3"
12570       ! Set Probe Num Steps
12580 OUTPUT Testset_main;"CALL:APAR:PROBE:POWER:STEP 3"
12590       ! Set Probe Step
12600       !OUTPUT Testset;"CALL:APAR:PROBE:SEQUENCE 1"
12610       ! Set Probe Sequence Max.It requires session negotiation.
12620       !WAIT 20
12630 !
12640 OUTPUT Testset_main;"INIT:CAPP:OFF"
12650       ! Set access probe power meas off
12660 DISP ""
12670 !
12680 RETURN
12690 !
12700 !
12710  Sensitivity:!
12720 !*******************************************************************
12730 ! Subroutine: Packet Error Rate Measurement
12740 !             3.3.1 Receiver Sensitivity
12750 !*******************************************************************
12760 !
12770 DISP "Testing Receiver Sensitivity"
12780 !
12790 !***Set up test parameters***
12800 !
12810 Ior=-55      !-105.5                        ! Level for sensitivity test
12811 !
12820 !
12830 !***Set up measurement parameters***
12840 !
12850 Max_packets=10000                 ! Maximum packets
12860 Conf_limit=95                      ! 95% confidence limit
12870 Per_limit=.5                      ! 0.5% PER requirement
12880 !
12890 OUTPUT Testset_main;"SETUP:CPERROR:COUNT ";Max_packets
12900       ! Set Maximum Packets for tests
12910 OUTPUT Testset_main;"SETUP:CPERROR:CONF ";Conf_limit
12920       ! Set Confidence limit
12930 OUTPUT Testset_main;"SETUP:CPERROR:CONF:REQ ";Per_limit
12940       ! Set PER requirement
12950 OUTPUT Testset_main;"SETUP:CPERROR:TIMEOUT 10"
12960       ! Set PER measurement timeout to 10 s
12961       !
12962 !
12963 OUTPUT Testset_aux1;"SETUP:CPERROR:COUNT ";Max_packets
12964       ! Set Maximum Packets for tests
12965 OUTPUT Testset_aux1;"SETUP:CPERROR:CONF ";Conf_limit
12966       ! Set Confidence limit
12967 OUTPUT Testset_aux1;"SETUP:CPERROR:CONF:REQ ";Per_limit
12968       ! Set PER requirement
12969 OUTPUT Testset_aux1;"SETUP:CPERROR:TIMEOUT 10"
12970       ! Set PER measurement timeout to 10 s
12971 !
12972 !
12980 !***Set test conditions***
12990 !
13000 OUTPUT Testset_main;"CALL:APPLICATION:ATDPACKETS 50"
13010       ! Set AT Directed Packets to 50% on the main unit
13011 OUTPUT Testset_aux1;"CALL:APPLICATION:ATDPACKETS 50"
13012       ! Set AT Directed Packets to 50% on the aux unit 1
13020 OUTPUT Testset_main;"CALL:APPLication:TRAFfic:FORMat 4,1024,2,128"
13030       ! Set F-Traffic Format to DRC value of 2, 1024 bits pkt size,
13040       ! 2 slot duration, 128 chips preamble (307.2 kbps).
13041 !
13042 OUTPUT Testset_main;"CALL:MCAR:AUX:APPLication:PLAY3:TRAFfic:FORMat 4,1024,2,128"
13043       ! Set F-Traffic Format to DRC value of 2, 1024 bits pkt size,
13044       ! 2 slot duration, 128 chips preamble (307.2 kbps).
13050 OUTPUT Testset_main;"CALL:POW ";Ior
13060       ! Set Cell Power for Test
13061 OUTPUT Testset_aux1;"CALL:POW ";Ior
13062       ! Set Cell Power for Test
13063 !
13070 WAIT .5
13080       ! Settling time for access terminal power to slew
13090 !
13100 !***Obtain measurement results of the main unit***
13110 !
13120 OUTPUT Testset_main;"INITIATE:CPERROR"
13130       ! Initiate a packet error rate measurement
13140 DISP "Measuring PER"
13150 OUTPUT Testset_main;"FETCh:CPERROR?"
13160       ! Query the test set for packet error rate measurement results
13170 ENTER Testset_main;Integrity_m,Per_test_m,Per_ratio_m,Per_count_m,Packets_testedm
13180 !
13190 SELECT Per_test_m
13200       ! Assign pass/fail results to a string
13210 CASE 0
13220 Pass_fail_m$="PASS"
13230 CASE 1
13240 Pass_fail_m$="FAIL"
13250 CASE 2
13260 Pass_fail_m$="MAX PACKETS"
13270 CASE 3
13280 Pass_fail_m$="UNKNOWN"
13290 END SELECT
13300 !
13301 !
13302 !***Obtain measurement results of the aux unit 1***
13303 !
13304 OUTPUT Testset_aux1;"INITIATE:CPERROR"
13305       ! Initiate a packet error rate measurement
13306 DISP "Measuring PER"
13307 OUTPUT Testset_aux1;"FETCh:CPERROR?"
13308       ! Query the test set for packet error rate measurement results
13309 ENTER Testset_aux1;Integrity_a,Per_test_a,Per_ratio_a,Per_count_a,Packets_testeda
13310 !
13311 SELECT Per_test_a
13312       ! Assign pass/fail results to a string
13313 CASE 0
13314 Pass_fail_a$="PASS"
13315 CASE 1
13316 Pass_fail_a$="FAIL"
13317 CASE 2
13318 Pass_fail_a$="MAX PACKETS"
13319 CASE 3
13320 Pass_fail_a$="UNKNOWN"
13321 END SELECT
13322 !
13323 !
13324 !
13325 !***Print measurement results of the main unit***
13326 !
13330 Print_title("Sensitivity Packet Error Rate Test Results of the main unit:")
13340 PRINT
13350 Print_results("Channel/Band= ",C_main_chan,Band$)
13360 Print_results("Integrity indicator = ",Integrity_m,"")
13370 Print_res_str("PER Test Results",Pass_fail_m$)
13380 Print_results("PER Ratio",Per_ratio_m,"%")
13390 Print_results("PER Errors Count",Per_count_m,"packets")
13400 Print_results("Packets Tested",Packets_testedm,"")
13410 PRINT
13420 Print_title("Sensitivity PER Test of the main unit Complete")
13430 PRINT
13440 PRINT
13450 !
13451 !
13452 !***Print measurement results of the aux unit 1***
13453 !
13454 Print_title("Sensitivity Packet Error Rate Test Results of the aux unit 1:")
13455 PRINT
13456 Print_results("Channel/Band= ",C_aux1_chan,Band$)
13457 Print_results("Integrity indicator = ",Integrity_a,"")
13458 Print_res_str("PER Test Results",Pass_fail_a$)
13459 Print_results("PER Ratio",Per_ratio_a,"%")
13460 Print_results("PER Errors Count",Per_count_a,"packets")
13461 Print_results("Packets Tested",Packets_testeda,"")
13462 PRINT
13463 Print_title("Sensitivity PER Test of the aux unit 1 Complete")
13464 PRINT
13465 PRINT
13466 !
13467 !
13468 !***Post test clean up***
13470 !
13480 OUTPUT Testset_main;"INIT:CPER:OFF"
13490       ! Turn off PER measurement
13500 OUTPUT Testset_main;"CALL:POW ";Init_cell_power
13510       ! Set cell power back to normal level
13520 DISP ""
13530 !
13531 !
13532 OUTPUT Testset_aux1;"INIT:CPER:OFF"
13533       ! Turn off PER measurement
13534 OUTPUT Testset_aux1;"CALL:POW ";Init_cell_power
13535       ! Set cell power back to normal level
13536 DISP ""
13537 !
13540 RETURN
13550 !
13560  Dynamic_range:!
13570 !*******************************************************************
13580 ! Subroutine: Packet Error Rate Measurement
13590 !             3.3.1 Dynamic Range
13600 !*******************************************************************
13610 !
13620 DISP "Testing Dynamic Range"
13630 !
13640 !***Set up test parameters***
13650 !
13660 Ior=-25                            ! Level for dynamic range test
13670 !
13680 !***Set up measurement parameters***
13690 !
13700 Max_packets=10000                 ! Maximum packets
13710 Conf_limit=95                      ! 95% confidence limit
13720 Per_limit=.5                      ! 0.5% PER requirement
13730 !
13740 OUTPUT Testset_main;"SETUP:CPERROR:COUNT ";Max_packets
13750       ! Set Maximum Packets for tests
13760 OUTPUT Testset_main;"SETUP:CPERROR:CONF ";Conf_limit
13770       ! Set Confidence limit
13780 OUTPUT Testset_main;"SETUP:CPERROR:CONF:REQ ";Per_limit
13790       ! Set PER requirement
13800 OUTPUT Testset_main;"SETUP:CPERROR:TIMEOUT 10"
13810       ! Set PER measurement timeout to 10 s
13820 !
13821 !
13822 OUTPUT Testset_aux1;"SETUP:CPERROR:COUNT ";Max_packets
13823       ! Set Maximum Packets for tests
13824 OUTPUT Testset_aux1;"SETUP:CPERROR:CONF ";Conf_limit
13825       ! Set Confidence limit
13826 OUTPUT Testset_aux1;"SETUP:CPERROR:CONF:REQ ";Per_limit
13827       ! Set PER requirement
13828 OUTPUT Testset_aux1;"SETUP:CPERROR:TIMEOUT 10"
13829       ! Set PER measurement timeout to 10 s
13830 !
13831 !***Set test conditions***
13840 !
13850 OUTPUT Testset_main;"CALL:APPLICATION:ATDPACKETS 50"
13860       ! Set AT Directed Packets to 50% on the main unit
13870 OUTPUT Testset_aux1;"CALL:APPLICATION:ATDPACKETS 50"
13871       ! Set AT Directed Packets to 50% on the aux unit 1
13880 FOR I=1 TO 2
13890       ! Loop to set parameters and measure PER for tests 2 and 3
13900 !
13910 IF (I=1) THEN
13920 Data_rate$="4,1024,2,128"
13930             ! Set F-Traffic Format to DRC value of 2, 1024 bits pkt size,
13940             ! 2 slot duration, 128 chips preamble (307.2 kbps) for test 2.
13950 Drate_str$="307.2 kbps"
13960 ELSE
13970 Data_rate$="12,4096,1,64"
13980             ! Set F-Traffic Format to DRC value of 12, 4096 bits pkt size,
13990             ! 1 slot duration, 64 chips preamble (2457.6 kbps) for test 3.
14000 Drate_str$="2457.6 kbps"
14010 END IF
14020           !
14030 OUTPUT Testset_main;"CALL:APPLication:TRAFfic:FORMat ";Data_rate$
14040       ! Set F-Traffic Format to DRC value of 2, 1024 bits pkt size,
14050       ! 2 slot duration, 128 chips preamble (307.2 kbps).
14051       !
14052 OUTPUT Testset_main;"CALL:MCAR:AUX:APPLication:PLAY3:TRAFfic:FORMat ";Data_rate$
14053       ! Set F-Traffic Format to DRC value of 2, 1024 bits pkt size,
14054       ! 2 slot duration, 128 chips preamble (307.2 kbps).
14060 WAIT .2
14070 OUTPUT Testset_main;"CALL:POW ";Ior
14080       ! Set Cell Power for Test
14081 OUTPUT Testset_aux1;"CALL:POW ";Ior
14082       ! Set Cell Power for Test
14083 !
14090 WAIT .5
14100       ! Settling time for access terminal power to slew
14110 !
14120 !***Obtain measurement results of the main unit***
14130 !
14140 OUTPUT Testset_main;"INITIATE:CPERROR"
14150       ! Initiate a packet error rate measurement
14160 DISP "Measuring PER"
14170 OUTPUT Testset_main;"FETCh:CPERROR?"
14180       ! Query the test set for packet error rate measurement results
14190 ENTER Testset_main;Integrity_m,Per_test_m,Per_ratio_m,Per_count_m,Packets_testedm
14200 !
14210 SELECT Per_test_m
14220       ! Assign pass/fail results to a string
14230 CASE 0
14240 Pass_fail_m$="PASS"
14250 CASE 1
14260 Pass_fail_m$="FAIL"
14270 CASE 2
14280 Pass_fail_m$="MAX PACKETS"
14290 CASE 3
14300 Pass_fail_m$="UNKNOWN"
14310 END SELECT
14320 !
14330 !***Print measurement results of the main unit***
14340 !
14350 Print_res_str("Dynamic Range PER Test Results of the main unit at ",Drate_str$)
14360 PRINT
14370 Print_results("Channel/Band= ",C_main_chan,Band$)
14380 Print_results("Integrity indicator = ",Integrity_m,"")
14390 Print_res_str("PER Test Results",Pass_fail_m$)
14400 Print_results("PER Ratio",Per_ratio_m,"%")
14410 Print_results("PER Errors Count",Per_count_m,"packets")
14420 Print_results("Packets Tested",Packets_testedm,"")
14430 PRINT
14440 Print_title("Dynamic Range PER Test on the Main Unit Complete")
14450 PRINT
14460 PRINT
14461 !
14462 !***Obtain measurement results of the aux unit 1***
14463 !
14464 OUTPUT Testset_aux1;"INITIATE:CPERROR"
14465       ! Initiate a packet error rate measurement
14466 DISP "Measuring PER"
14467 OUTPUT Testset_aux1;"FETCh:CPERROR?"
14468       ! Query the test set for packet error rate measurement results
14469 ENTER Testset_aux1;Integrity_a,Per_test_a,Per_ratio_a,Per_count_a,Packets_testeda
14470 !
14471 SELECT Per_test_a
14472       ! Assign pass/fail results to a string
14473 CASE 0
14474 Pass_fail_a$="PASS"
14475 CASE 1
14476 Pass_fail_a$="FAIL"
14477 CASE 2
14478 Pass_fail_a$="MAX PACKETS"
14479 CASE 3
14480 Pass_fail_a$="UNKNOWN"
14481 END SELECT
14482 !
14483 !***Print measurement results of the aux unit 1***
14484 !
14485 Print_res_str("Dynamic Range PER Test Results of the Aux Unit 1 at ",Drate_str$)
14486 PRINT
14487 Print_results("Channel/Band= ",C_aux1_chan,Band$)
14488 Print_results("Integrity indicator = ",Integrity_a,"")
14489 Print_res_str("PER Test Results",Pass_fail_a$)
14490 Print_results("PER Ratio",Per_ratio_a,"%")
14491 Print_results("PER Errors Count",Per_count_a,"packets")
14492 Print_results("Packets Tested",Packets_testeda,"")
14493 PRINT
14494 Print_title("Dynamic Range PER Test on the aux unit 1 Complete")
14495 PRINT
14496 PRINT
14497 !
14498       !
14499 NEXT I
14500 !
14501 !***Post test clean up***
14510 !
14520 OUTPUT Testset_main;"INIT:CPER:OFF"
14530       ! Turn off PER measurement
14540 OUTPUT Testset_main;"CALL:POW ";Init_cell_power
14550       ! Set cell power back to normal level
14551       !
14552 OUTPUT Testset_aux1;"INIT:CPER:OFF"
14553       ! Turn off PER measurement
14554 OUTPUT Testset_aux1;"CALL:POW ";Init_cell_power
14555       ! Set cell power back to normal level
14560 WAIT .1
14570 DISP ""
14580 !
14590 RETURN
14600 !
14610 !
14620 !
14630 !
17080 !
17090  End_connection:               !
17100 !*******************************************************************
17110 ! Subroutine: Close data connection
17120 !*******************************************************************
17130 !
17140 DISP "Closing data connection"
17150 !
17160 OUTPUT Testset_main;"CALL:DCONNECTED?"
17170       ! Checks connection status
17180 ENTER Testset_main;Data_stopped
17190 !
17200 IF Data_stopped=0 THEN
17210 DISP "Data connection closed"
17220 !
17230 ELSE
17240 OUTPUT Testset_main;"CALL:DCONNECTED:TIMEOUT 10"
17250           ! Set connection change detector timeout
17260 OUTPUT Testset_main;"CALL:DCONNECTED:ARM"
17270           ! Arm the connection state change detector
17280 OUTPUT Testset_main;"CALL:FUNCTION:DATA:STOP"
17290           ! Close the data connection
17300 OUTPUT Testset_main;"CALL:DCONNECTED?"
17310           ! Query the data connection status
17320 ENTER Testset_main;Data_stopped
17330 !
17340 IF Data_stopped=1 THEN
17350 Print_title("Data connection could not be closed")
17360 Print_title("Ending Testing")
17370 GOTO End_program
17380 END IF
17390 !
17400 DISP "Data connection closed"
17410 END IF
17420 !
17430 RETURN
17440 !
17450  Open_rslts_file:!
17460 !*******************************************************************
17470 ! Subroutine: Open text file to save test results to
17480 !             C:\RESULTS\current date\(file name is HID plus current time)
17490 !*******************************************************************
17500 !
17510 Fileopened_flag=0
17520       ! Indicates that a results file is not yet open
17530 Cur_dt$=DATE$(TIMEDATE)
17540 ON ERROR RECOVER Make_dir
17550       ! If error occurs (presumably because the directory doesn't exist),
17560       ! then create directory
17570 MASS STORAGE IS "C:\RESULTS"&"\"&Cur_dt$
17580       ! Sets the current directory
17590 GOTO Skip_create
17600  Make_dir: CREATE DIR "C:\RESULTS"&"\"&Cur_dt$
17610  Skip_create: OFF ERROR
17620  !Returns error handling to the default: "report to user with a pause"
17630 Cur_tm$=TIME$(TIMEDATE)
17640 Cur_tm$[3]="_"&Cur_tm$[4]
17650       ! Replace the ":" in TIME$ to "_"
17660 Cur_tm$[6]="_"&Cur_tm$[7]
17670       ! Replace the ":" in TIME$ to "_"
17680 Result_file$=Hid_dec$[4,11]&" "&Cur_tm$&".txt"
17690       ! Name the result file using HID and current time
17700 CREATE Result_file$,130
17710       ! Create the result file with 130 records
17720 ASSIGN @File TO Result_file$
17730       ! Wherever @File appears, use Result_file$
17740       ! Create data file using hardware ID and current time
17750 COM /File/@File
17760 Fileopened_flag=1
17770       ! Set open file flag to true
17780 RETURN
17790 !
17800  Start_time:!
17810 !*******************************************************************
17820 ! Subroutine: Start Test Time
17830 !*******************************************************************
17840 !
17850 Start_time=TIMEDATE
17860 RETURN
17870 !
17880  End_time:!
17890 !*******************************************************************
17900 ! Subroutine: End Test Time
17910 !*******************************************************************
17920 !
17930 End_time=TIMEDATE
17940 RETURN
17950 !
17960  End_program:!
17970 !*******************************************************************
17980 ! Subroutine: End of all testing clean up
17990 !*******************************************************************
18000 !
18010 GOSUB End_time
18020 Print_title("End of Test")
18030 Print_results("Total Test Time= ",End_time-Start_time," Seconds")
18040 !
18050 !***End connection and return to default call processing settings***
18060 !
18070 OUTPUT Testset_main;"SYSTem:COMMunicate:LAN:EXTernal:DCONnect"
18071 WAIT 2
18080       ! Disconnect two test sets
18100 !
18180 OUTPUT Testset_main;"*RST"
18181 OUTPUT Testset_aux1;"*RST"
18182 !
18190 IF Fileopened_flag THEN ASSIGN @File TO *
18200       ! Close the data file
18210 !
18220 PRINT
18230 PRINT "End of Program"
18240 END
18250 !
18260 !**************************************************************************
18270 ! SUB-PROGRAM SECTION
18280 !**************************************************************************
18290 !
18300  Timeout: SUB Timeout ! Global timeout handler
18320 PRINT
18330 PRINT "Program timed out, check setup"
18340 CLEAR 7
18350 CLEAR Testset_main
18360 CLEAR Testset_aux1
18370 STOP
18380 SUBEND
18390 !
18400  Print_results: SUB Print_results(Name$,Res1,OPTIONAL Units$)
18410 COM /File/Openfile_flag
18420 IF Res1=9.91E+37 THEN
18430 PRINT USING "5X,40A,5X,1D.E,1X,20A";Name$;Res1;Units$
18440 IF Openfile_flag THEN
18450 COM /File/@File
18460 OUTPUT @File USING "5X,40A,5X,1D.E,1X,20A";Name$;Res1;Units$
18470 END IF
18480 ELSE
18490 PRINT USING "5X,40A,5X,M5D.2D,1X,20A";Name$;Res1;Units$
18500 IF Openfile_flag THEN
18510 OUTPUT @File USING "5X,40A,5X,M4D.2D,1X,20A";Name$;Res1;Units$
18520 END IF
18530 END IF
18540 SUBEND
18550 !
18560  Print_res_str: SUB Print_res_str(String_name$,OPTIONAL Results$)
18570 COM /File/Openfile_flag
18580 PRINT USING "5X,40A,5X,20A";String_name$;Results$
18590 IF Openfile_flag THEN
18600 COM /File/@File
18610 OUTPUT @File USING "5X,40A,5X,20A";String_name$;Results$
18620 END IF
18630 SUBEND
18640 !
18650  Print_title: SUB Print_title(Title$)
18660 COM /File/Openfile_flag
18670 PRINT USING "3X,72A";Title$
18680 IF Openfile_flag THEN
18690 COM /File/@File
18700 OUTPUT @File USING "2A,/";" "
18710 OUTPUT @File USING "3X,72A,/";Title$
18720 END IF
18730 SUBEND
18740 !
18750  Connected: DEF FNConnected ! Function to check connected state
18760 COM Testset_main,Testset_aux1,Result_file$
18770 OUTPUT Testset_main;"CALL:DCONNECTED?"
18780           ! Query the main channel connected status
18790 ENTER Testset_main;Main_connected
18800 OUTPUT Testset_main;"CALL:DCONNECTED?"
18810           ! Query the aux1 channel connected status
18820 ENTER Testset_main;Aux1_connected
18830 Connected=Main_connected+Aux1_connected
18840 RETURN Connected
18850           ! Function returns 2 for two channels connected,
18860           ! 1 for only main channel connected,
18870           ! 0 for idle or session open
18880 FNEND
18890 !
18900  Session_check: DEF FNSession_check ! Function to check session open state
18920 COM Testset_main,Testset_aux1,Result_file$
18921 OUTPUT Testset_main;"CALL:SOPEN?"
18930           ! Query the session open state
18940 ENTER Testset_main;Session_check
18950 RETURN Session_check
18960           ! Function returns 1 for session open, 0 for idle or connected
18970 FNEND
18980                     !

Related Topics


Test Adherence to Standards

C.S0029 Test Application Specification Description (TAP/ETAP/MCTAP)