790
SUBEND
800
!
This subprogram calls Read_status to check the validity of bit 7 (DONE).
810
!
This ensures the validity of bits 6,5,4, and 1.
820
SUB Wait_done
830
Wait_done: !
840
COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
850
REPEAT
860
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Mmcomp, Pass_fail)
870
UNTIL Done
880
SUBEND
890
!
This subprogram calls Read_status to determine if an error has occurred
900
!
(status bit 6). This subprogram is called after Wait_done to ensure the
910
!
validity of the Noerr bit. If an error has occurred, the error code is
920
!
displayed.
930
SUB Err_chk(Noerr)
940
Err_chk: !
950
COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
960
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Mmcomp, Pass_fail)
970
IF Noerr THEN Ok
980
WRITEIO -16,Ba8;15
990
CALL Qry_ready
1000
Errcode=READIO(-16,Ba8)
1010
Errcode=BINAND(Errcode,255)
1020
PRINT “Error Code:”;Errcode
1030
STOP
1040 Ok:SUBEND
1050 !
This subprogram calls Read_status to determine when an error code or
1060 !
a response to an instrument query is in the Query Response register
1070 !
(status bit 1).
1080 SUB Qry_ready
1090 Qry_ready: !
1100
COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
1110
REPEAT
1120
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Mmcomp, Pass_fail)
1130
UNTIL Qryrdy
1140 SUBEND
1150 !
This subprogram calls Read_status to determine when measurement data
1160 !
is available in the multimeter data buffer (status bit 4).
1170 SUB Data_ready
1180 Data_ready: !
1190
COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
1200
REPEAT
Continued on Next Page
248 HP E1326B/E1411B Multimeter Register-Based Programming
Appendix C
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com