EasyManua.ls Logo

HP 8920B - Page 638

HP 8920B
682 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
638
Chapter 8, Programming The Call Processing Subsystem
Example Programs
6040 SELECT Order$
6050 CASE "Power"
6060 Ptr_value=32
6070 OUTPUT Inst_addr;"STAT:CALLP:PTR "&VAL$(Ptr_value)
6080 OUTPUT Inst_addr;"CALLP:ORD ’CHNG PL "&VAL$(Parm)&"’"
6090 CASE "Mainten"
6100 Ptr_value=16
6110 OUTPUT Inst_addr;"STAT:CALLP:PTR "&VAL$(Ptr_value)
6120 OUTPUT Inst_addr;"CALLP:ORD ’MAINTEN’"
6130 CASE "Alert"
6140 Ptr_value=32
6150 OUTPUT Inst_addr;"STAT:CALLP:PTR "&VAL$(Ptr_value)
6160 OUTPUT Inst_addr;"CALLP:ORD ’ALERT’"
6170 END SELECT
6180 LOOP
6190 WAIT Wait_time
6200 OUTPUT Inst_addr;"*ESR?;STAT:CALLP:EVEN?"
6210 ENTER Inst_addr;Std_event,Call_proc_even
6220 IF Std_event THEN RETURN 0
6230 IF BIT(Call_proc_even,LOG(Ptr_value)/LOG(2)) THEN RETURN 1
6240 END LOOP
6250 FNEND
6260 !
7000 Print_error: SUB Print_error
7010 OPTION BASE 1
7020 COM /Io_addresses/ INTEGER Inst_addr,Bus_addr
7030 COM /Prog_control/ INTEGER Std_event,Wait_time
7040 INTEGER N
7050 DIM Error_message$[255],Error$(5)[20]
7060 Error$(2)="Query"
7070 Error$(3)="Device Dependent"
7080 Error$(4)="Execution"
7090 Error$(5)="Command"
7100 WAIT .1 !Allow time for Error Queue to be updated.
7110 FOR N=2 TO 5
7120 IF BIT(Std_event,N) THEN
7130 PRINT "A "&Error$(N)&" error has occurred."
7140 OUTPUT Inst_addr;"SYSTem:ERRor?"
7150 ENTER Inst_addr;Error_number,Error_message$
7160 PRINT Error_number,Error_message$
7170 END IF
7180 NEXT N
7190 IF BINAND(Std_event,195) THEN
7200 BEEP
7210 PRINT "Unrecognized condition. Standard Event register = ";Std_event
7220 END IF
7230 STOP
7240 SUBEND
7250 !
10000 Meas_carrier: SUB Meas_carrier

Table of Contents

Other manuals for HP 8920B

Related product manuals