527
Chapter 8, Programming the Call Processing Subsystem
Example Programs
11020 OUTPUT Inst_addr;"DISP ACNT;:CALLP:MOD ’MEAS’;:MEAS:RFR:POW?;FREQ:ERR?"
11030 ENTER Inst_addr;Power,Freq_error
11040 OUTPUT Inst_addr;"MEAS:AFR:FREQ?;FM?"
11050 ENTER Inst_addr;Audiofreq,Deviation
11060 PRINT USING "K,2D.3D,K";"Carrier Power = ";Power;" Watts"
11070 PRINT USING "K,2D.3D,K";"Audio Frequency = ";Audiofreq/1000;" kHz"
11080 PRINT USING "K,2D.3D,K";"FM Deviation = ";Deviation/1000;" kHz"
11090 PRINT USING "K,2D.3D,K";"Carrier Freq Error = ";Freq_error/1000;" kHz"
11100 SUBEXIT
11110 Timed_out:!
11120 ON TIMEOUT Bus_addr,5 GOTO Cannot_recover
11130 CLEAR Inst_addr
11140 OUTPUT Inst_addr;"trig:abort;mode:retr:rep"
11150 DISP "you should have the box back."
11160 ENABLE
11170 Cannot_recover:!
11180 DISP "Cannot regain control of the Test Set."
11190 STOP
11200 SUBEND
11210 !
12000 Meas_sinad: SUB Meas_sinad
12010 COM /Io_addresses/ INTEGER Inst_addr,Bus_addr
12020 INTEGER N
12025 ON TIMEOUT 7,5 RECOVER Timed_out
12030 OUTPUT Inst_addr;"DISP CME;:AFG1:DEST ’FM’;FREQ 1KHZ FM 8KHZ;FM:STAT ON"
12040 OUTPUT Inst_addr;"AFAN:INP ’AUDIO IN’;DEMP ’OFF’;DET ’RMS’"
12050 OUTPUT Inst_addr;"AFAN:FILT1 ’C MESSAGE’;FILT2 ’>99KHZ LP’"
12060 OUTPUT Inst_addr;"MEAS:AFR:SEL ’SINAD’;:RFG:AMPL -113DBM"
12070 OUTPUT Inst_addr;"TRIG:MODE:RETR SINGLE;SETT FULL"
12080 Avg_sinad=0
12090 FOR N=1 TO 5
12100 OUTPUT Inst_addr;"TRIG;:MEAS:AFR:SINAD?"
12110 ENTER Inst_addr;Sinad
12120 Avg_sinad=Avg_sinad+Sinad
12130 NEXT N
12140 PRINT USING "K,3D.2D,K";"SINAD = ";Avg_sinad/N;" dB at -116 dBm."
12150 OUTPUT Inst_addr;"TRIG:MODE:RETR REP;SETT FULL"
12160 OUTPUT Inst_addr;"RFG:AMPL -30DBM;:DISP ACNT"
12165 SUBEXIT
12170 Timed_out:!
12180 ON TIMEOUT Bus_addr,Time_out_value RECOVER Cannot_recover
12190 OUTPUT Inst_addr;"trig:abort;mode:retr:rep"
12200 ENABLE
12210 DISP "you should have the box back."
12220 SUBEXIT
12230 Cannot_recover:!
12240 DISP "Cannot regain control of Test Set."
12250 STOP
12260 SUBEND