360
!
Set the sample source(IMMEDIATE)
370 CALL
Peek_meas(7,0)
380
!
Set the sample rate (Set if sample source is Timer (1))
390
!
CALL Peek_meas(10,0,70)
400
!
Place (arm) the multimeter in the wait-for-trigger state
410
CALL Peek_meas(12,1)
420
!
Dimension a computer variable to store the measurements.
430
!
(size = number of channels * number of readings per channel*
440
!
number of scans.)
450
REAL Readings(1:8)
460 !
Step through the scan list; close the multiplexer channel, check that the
470
!
channel is closed, trigger the multimeter, wait for the multimeter to
480
!
complete the measurement(s), close the next channel ...
490
FOR I=1 TO 8
!
One trigger for each channel
500
CALL Close_chan
510
CALL Peek_meas(13)
520
NEXT I
530
!
Retrieve the measurement(s) and convert the measured signal to volts,
540
!
ohms, etc.
550
CALL Read_data(Readings(*))
560
END
570
!
The following subprogram reads the Status register and is called by
580
!
other subprograms to determine when a particular action can be performed.
590
SUB Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Mmcomp, Pass_fail)
600
Read_status: !
610 COM
I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
620 Status=READIO(-16,Ba4)
630 Rdy=BIT(Status,0)
640 Mmcomp=BIT(Status,5)
650
Done=BIT(Status,7) AND Rdy
660
Indardy=BIT(Status,4) AND Done
670
Qryrdy=BIT(Status,1) AND Done
680
Noerr=NOT (NOT (BIT(Status,6)) AND Done)
690 Pass_fail=BIT(Status,2)
700
SUBEND
710
!
This subprogram calls the Read_status subprogram to check status bit 0
720
!
(Cmd/Parm Rdy) to determine when a command or parameter can be sent.
730
SUB Wait_not_bsy
740
Wait_not_bsy: !
750
COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
760
REPEAT
770
CALL Read_status(Status,Rdy,Done,Indardy,Qryrdy,Noerr,Mmcomp, Pass_fail)
780
UNTIL Rdy
Continued on Next Page
Appendix C
HP E1326B/E1411B Multimeter Register-Based Programming 247
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com