User`s manual

Resetting the
Multimeter
The following program resets the multimeter.
HP BASIC/WS
10 !Map the A16 address space in the HP V/382 and store the multimeter base
20 !address in a variable.
30 CONTROL 16,25;2
40 COM Base_addr
50 Base_addr=DVAL("C600",16)
60 !
Call the subprogram which resets the multimeter.
70 CALL Mm_rst
80 END
90 !
This subprogram checks each bit in the multimeter Status register.
100 !The subprogram is called by subprogram Mm_rst to monitor status bit 2.
110 SUB Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Pass_fail)
120 COM Base_addr
130 Status=READIO(-16,Base_addr+4)
140 Rdy=BIT(Status,0)
150 Done=BIT(Status,7) AND Rdy
160 Indardy=BIT(Status,4) AND Done
170 Qryrdy=BIT(Status,1) AND Done
180 Noerr=NOT (NOT (BIT(Status,6)) AND Done)
190 Pass_fail=BIT(Status,2)
200 SUBEND
210 !
This subprogram resets the multimeter by disabling the SYSFAIL bit,
220 !then writing a ’1’ to Control Register bit 0, and then writing a ’0’ to
230 !Control Register bit 0. Once the reset completes, SYSFAIL is re-enabled.
240 SUB Mm_rst
250 COM Base_addr
260 WRITEIO -16,Base_addr+4;
270 WRITEIO -16,Base_addr+4;3
280 WRITEIO -16,Base_addr+4;2
290 REPEAT
300 CALL Read_status(Status,Rdy,Done,Indardy,
Qryrdy,Noerr,Pass_fail)
310 UNTIL Pass_fail
320 WRITEIO -16,Base_addr+4;0
330 SUBEND
Appendix C HP E1326B/E1411B Multimeter Register-Based Programming 221