69
S:\Hp8960\E1960A GSM Mobile Test Application\A.04 Release\Proguide\Chapters\prog_prog_guide_comprehensive_prog_example.fm
Comprehensive Program Example
2640 !
2650 OUTPUT Test_set;”CALL:END”
2660 OUTPUT Test_set;”CALL:CONN:STAT?”
2670 ENTER Test_set;Call_connected
2680 IF Call_connected THEN
2690 BEEP
2700 PRINT “Unable to complete BS termination. Program terminated.”
2710 STOP
2720 END IF
2730 PRINT “Program completed.”
2740 STOP
2750 !
2760 Bad_measurement: !
2770 PRINT “Measurement error: “&Meas_done$
2780 PRINT “Measurement Integrity value =”;Integrity
2790 RETURN
2800 !
2810 END ! End of program
2820 !
2830 SUB Chk_err_msg_que
2840 COM /Address/ Test_set
2850 DIM Error_message$[255]
2860 Error_flag=0
2870 LOOP
2880 OUTPUT Test_set;”SYST:ERR?”
2890 ENTER Test_set;Error_number,Error_message$
2900 EXIT IF Error_number=0
2910 IF Error_number=-350 THEN
2920 Error_flag=1
2930 PRINT “Error Message Queue overflow. Error messages have been lost.”
2940 ELSE
2950 Error_flag=1
2960 PRINT Error_number,Error_message$
2970 END IF
2980 END LOOP
2990 IF NOT Error_flag THEN
3000 PRINT “No errors in Error Message Queue.”
3010 SUBEXIT
3020 END IF
3030 STOP
3040 SUBEND
Example Program Without Comments
The following program is basically the same as the example program presented in "Example Program With
Comments" on page 64 but comments have been removed and the coding reflects the use of compound
commands and complex commands to achieve coding efficiency.
10 ! Prog Name: sim_man_ex.txt Rev: A.0.2 Date Code: 12/18/98
20 OPTION BASE 1
30 COM /Address/ Test_set
40 DIM Swit_offs$[255],Mod_offs$[255]
50 REAL Txpower(4)