User`s manual

1210 CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Mmcomp, Pass_fail)
1220 UNTIL Indardy
1230 SUBEND
1240 !
This subprogram monitors bit 5 (MULTIMETER COMPLETE) in the
1250 !status register. When the bit is set, the A/D portion of the measurement is
1260 !in progress and the multiplexer channel is advanced. By advancing the
1270 !channel during this condition, each channel can be scanned
1280 !before the readings are read from the buffer.
1290 SUB Mm_comp
1300 Mm_comp: !
1310 COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
1320 REPEAT
1330
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Mmcomp, Pass_fail)
1340 UNTIL Mmcomp
1350 SUBEND
1360 !
This subprogram monitors the multiplexer Status register. It is called
1370 !by subprogram Chan_rdy to determine when a channel can be closed
1380 !(or opened), and to determine when a channel has finished closing (or
1390 !opening).
1400 SUB Mux_status
1410 Mux_status: !
1420 COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
1430 M_status=READIO(-16,Base_addrm+4)
1440 Chan_closed=BIT(M_status,7)
1450 SUBEND
1460 !
This subprogram closes the multiplexer channels.
1470 SUB Close_chan
1480 Close_chan: !
1490 COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
1500 CALL Chan_rdy
1510 WRITEIO -16,Base_addrm+32;2^(I-1)
1520 CALL Chan_rdy
1530 SUBEND
1540 !
This subprogram calls Mux_status to determine when a channel can be
1550 !closed and when a channel has finished closing.
1560 SUB Chan_rdy
1570 Chan_rdy: !
1580 COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
1590 REPEAT
1600 CALL Mux_status
1610 UNTIL Chan_closed
1620 SUBEND
Continued on Next Page
Appendix C HP E1326B/E1411B Multimeter Register-Based Programming 249