User`s manual
1190 !This subprogram writes commands and parameters to the Command
1200 !and Parameter registers. It calls Wait_not_bsy prior to writing the next
1210 !command or parameter. Once a command and its parameter(s) are written,
1220 !it calls Wait_done and Err_chk to check for any errors.
1230 !The subprogram also stores the measurement function, range, and aperture
1240 !time so that the right routine (in subprogram Read_data) is used to
1250 !convert the measured signal to the appropriate quantity.
1260 SUB Peek_meas(Cmd,OPTIONAL INTEGER Parm1,Parm2,Parm3)
1270 Peek_meas: !
1280 COM Base_addr,Aper,Func,Rng
1290 CALL Wait_not_bsy
1300 WRITEIO -16,Base_addr+8;Cmd
1310 IF NPAR>1 THEN
1320 CALL Wait_not_bsy
1330 WRITEIO -16,Base_addr+10;Parm1
1340 END IF
1350 IF NPAR>2 THEN
1360 CALL Wait_not_bsy
1370 WRITEIO -16,Base_addr+10;Parm2
1380 END IF
1390 IF NPAR>3 THEN
1400 CALL Wait_not_bsy
1410 WRITEIO -16,Base_addr+10;Parm3
1420 END IF
1430 IF Cmd=0 THEN Aper=Parm1
1440 IF Cmd=2 THEN Rng=Parm1
1450 IF Cmd=4 THEN Func=Parm1
1460 CALL Wait_done
1470 CALL Err_chk(Noerr)
1480 SUBEND
1490 !
This subprogram retrieves the reading(s) from the multimeter’s data
1500 !buffer and converts it to the appropriate quantity (i.e. voltage,
1510 !resistance) based on the measurement function, range, and aperture time.
1520 !The subprogram calls Data_ready to determine when the readings are
1530 !in the data buffer.
1540 SUB Read_data(Readings(*))
1550 Read_data: !
1560 COM Base_addr,Aper,Func,Rng
1570 CALL Data_ready
1580 FOR I=1 TO 25 !
Number of bursts * number of readings/burst
1590 IF Aper=6 THEN
1600 Lower_word=READIO(-16,Base_addr+12)
1610 Count=Lower_word/32768
Continued on Next Page
Appendix C HP E1326B/E1411B Multimeter Register-Based Programming 237