Sample Program to
Detect the Error
When you write an HP-IB control program for the HP 4284A, the
following sample program is a useful debugging to ol (using the
HP 4284A status bytes and the
SYST:ERRor?
query) for detecting
the errors.
100 OUTPUT 717;"*ESE 60" ! Event Status Resister enable
110 ! (error bits enable)
120 OUTPUT 717;"*SRE 32" ! Status Byte Resister enable
130 ! (Event Status Summary bit enable)
140 ON INTR 7,2 CALL Errors
150 ENABLE INTR 7;2
.
.
.
500 SUB Errors
510 DIM Err$[50]
520 Sp=SPOLL(717)
530 IF BIT(Sp,5) THEN
540 OUTPUT 717;"*ESR?" ! Clear the Event Status Resister
550 ENTER 717;Esr
560 PRINT "Event Status Resister =";Esr
570 LOOP
580 OUTPUT 717;"SYST:ERR?"! Error No. & message query
590 ENTER 717;Err$
600 EXIT IF VAL(Err$)=0 ! Exit if no error
610 PRINT Err$
620 END LOOP
630 END IF
640 ENABLE INTR 7;2
650 SUBEND
B-2 Error and Warning Messages