380
!
This subprogram calls Read_status to check status bit 1 to determine
390
!
when an error code is in the Query Response register.
400
SUB Qry_ready
410
REPEAT
420
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Pass_fail)
430
UNTIL Qryrdy
440
SUBEND
450
!
This subprogram calls Read_status to check status bit 6 to determine
460
!
if an error has occurred. If there is an error, the code is written to the
470
!
Query Response register and then is read from the register.
480
SUB Err_chk(Noerr)
490 COM
Base_addr
500
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Pass_fail)
510
IF Noerr THEN Ok
520 WRITEIO
-16,Ba8;15
530 CALL
Qry_ready
540
Errcode=READIO(-16,Ba8)
550
Errcode=BINAND(Errcode,255)
560 PRINT “Error Code:”;Errcode
570
Ok:SUBEND
580
!
This subprogram generates an error by specifying a parameter opcode of 7
590
!
for the function parameter. (This is a parameter out of range.)
600
SUB Error_gen
610
COM Base_addr
620
WRITEIO -16,Ba8;4
630
CALL Wait_not_bsy
640
WRITEIO -16,Ba10;7
650
CALL Wait_done
660
CALL Err_chk(Noerr)
670
SUBEND
Appendix C
HP E1326B/E1411B Multimeter Register-Based Programming 231
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com