320
S:\agilent\8920\8920b\PRGGUIDE\BOOK\CHAPTERS\advoper.fb
Chapter 5, Advanced Operations
Passing Control
480 ! Data is ready in the Test Set
490 OUTPUT Inst_address;"PROG:NUMB? Meas_power"
500 ENTER Inst_address;Meas_power
510 PRINT "Measured power = ";Meas_power
520 !
530 DISP "Program finished."
540 END
550 !
560 SUB Pass_control
570 !
580 COM /Gpib_names/ INTEGER Internal_gpib,Inst_address,Cntrl_state
590 COM /Cntrl_names/ Ext_cntrl_addrs,Int_cntrl_addrs
600 COM /Io_names/ INTEGER Printer_addrs,Pwr_suply_addrs
610 COM /Io_values/ REAL Meas_power,Prog_state$[80],Prog_name$[50]
620 COM /Reg_vals/ INTEGER Status_byte,Stdevnt_reg_val
630 !
640 OFF INTR Internal_gpib
650 Status_byte=SPOLL(Inst_address)
660 IF NOT BIT(Status_byte,5) THEN
670 PRINT "SRQ for unknown reason. Status Byte = ";Status_byte
680 STOP
690 END IF
700 !
710 ! Tell Test Set where to pass control back to
720 OUTPUT Inst_address;"*PCB";Int_cntrl_addrs
730 !
740 ! Put Test Set in LOCAL mode so front panel keys function
750 LOCAL Inst_address
760 !
770 PASS CONTROL Inst_address
780 !
790 ENABLE INTR Internal_gpib;2
800 !
810 SUBEND