User`s manual

Checking for Errors
The following program is a method of checking for errors as you program the
multimeter. The program monitors the multimeter’s Standard Event Status
Register for an error condition. If no errors occur, the multimeter functions as
programmed. If errors do occur, the multimeter interrupts the computer and the
error codes and messages are read from the multimeter error queue.
The computer commands shown are for an HP 9000 Series 200/300
computer running HP BASIC and controlling the multimeter over HP-IB.
10 !Call computer subprogram "Errmsg" if a multimeter programming error
20 !occurs. Enable the computer to respond to an interrupt from the multimeter.
30 ON INTR 7 CALL Errmsg
40 ENABLE INTR 7;2
50 !
Unmask the Event Status bit in the multimeter’s Status Byte register.
60 !Unmask the multimeter error conditions in its Standard Event Status
70 !register.
80 OUTPUT 70903;"*SRE 32"
90 OUTPUT 70903;"*ESE 60"
100 !
At this point, the multimeter is programmed for the intended application.
110 OUTPUT 70903;"...
120 OUTPUT 70903;"...
130 !
Allow the computer time to respond if an error occurs during the
140 !multimeter configuration or measurement. Process the measurement
150 !data if no error occurs.
160 WAIT 2
170 ENTER 70903;...
180 PRINT ...
190 END
200 !
When an error occurs, clear the multimeter to regain control. Execute a
210 !Serial Poll to clear the service request bit in the Status Byte register.
220 !Read all error messages in the multimeter error queue. Clear all bits in
230 !the multimeter Standard Event Status Register.
240 SUB Errmsg
250 DIM Message$[256]
260 CLEAR 70903
270 B=SPOLL(70903)
280 REPEAT
290 OUTPUT 70903;"SYST:ERR?"
300 ENTER 70903;Code,Message$
310 PRINT Code,Message$
320 UNTIL Code=0
330 OUTPUT 70903;"*CLS"
340 STOP
350 SUBEND
66 Using the HP E1326B/E1411B Multimeter Chapter 3