Agilent Technologies A.18.00 Weather Radio User Manual


 
522
S:\agilent\8920\8920b\PRGGUIDE\BOOK\CHAPTERS\callproc.fb
Chapter 8, Programming the Call Processing Subsystem
Example Programs
SRQ Example Program
10 ! SRQ_sample program
20 OPTION BASE 1
30 COM /Io_addresses/ INTEGER Inst_addr,Bus_addr
40 COM /Prog_control/ INTEGER Oper_complete,Wait_time,Error_flag
50 !
60 Bus_addr=7 ! Set to 8 when running on 8920
70 Inst_addr=714 ! Set to 814 when running on 8920
80 Wait_time=0 ! Set to minimum of .5 when running on an 8920
90 Oper_complete=0 ! 1 = Operation complete 0 = Operation not complete
100 Error_flag=0 ! 1 = An error has occurred 0 = no error has occurred
110 ABORT Bus_addr
120 CLEAR SCREEN
130 PRINTER IS CRT
140 Cnfg_srvc_intrp
150 ON INTR Bus_addr,15 CALL Srvice_interupt
160 ENABLE INTR Bus_addr;2
170 !
180 Start_test:!
190 Cond_test_set
200 OUTPUT Inst_addr;"DISP ACNT"
210 IF NOT FNCnfg_base_sta(0,212,231,5970,-47,"AMPS",321) THEN Print_error
220 IF FNSet_state("Register") THEN
230 Read_rcdd_data("1234")! Pass the numbers of the RCDD fields to be read.
240 ELSE
250 Print_error
260 END IF
270 IF NOT FNSet_state("Page") THEN CALL Print_error
280 Meas_carrier
290 IF FNOrder("Power",7) THEN
300 Read_rcdd_data("1")
310 ELSE
320 Print_error
330 END IF
340 OUTPUT Inst_addr;"CALLP:VCH 211;VMAC 4;SAT ’5970HZ’"
350 IF NOT FNSet_state("Handoff") THEN CALL Print_error
360 Meas_sinad
370 IF NOT FNOrder("Mainten",0) THEN CALL Print_error !0 = dummy variable
380 IF FNOrder("Alert",0) THEN ! 0 = dummy variable to satisfy parm list
381 BEEP
390 INPUT "Did the phone ALERT? (Y/N)",Yes_no$
400 IF Yes_no$[1,1]="N" OR Yes_no$[1,1]="n" THEN
410 PRINT "Phone failed to ALERT."
420 STOP
430 END IF
440 ELSE
450 Print_error
460 END IF
470 IF NOT FNSet_state("Release") THEN CALL Print_error