2000 !
This subprogram reads the measurements (all channels) from the
2010 !
data buffer. It converts the measured quantities to volts, ohms, etc.,
2020 !
and displays them.
2030 SUB Read_data(Readings(*))
2040 Read_data: !
2050
COM I,Base_addr,Base_addrm,Aper,Func,Rng,Nchan,Chan_closed
2060
CALL Data_ready
2070
FOR R=1 TO 8 !
# of channels * # of readings/channel * # of scans
2080
IF Aper=6 THEN
2090 Lower_word=READIO(-16,Ba12)
2100 Count=Lower_word/32768
2110 Header=BIT(Lower_word,0)*128+Rng
2120 Exp=BINAND(Header,7)
2130
ELSE
2140
Upper_word=READIO(-16,Ba12)
2150
CALL Data_ready
2160
Lower_word=READIO(-16,Ba12)
2170
Header=SHIFT(Upper_word,8)
2180
Count=65536.*BINAND(Upper_word,255)+2.* SHIFT(Lower_word,1)
2190
Exp=BINAND(Header,7)
2200
IF Count>=8388608 THEN
2210
Count=(Count-16777216.)/8388608
2220
ELSE
2230
Count=Count/8388608
2240 END
IF
2250
END IF
2260
IF Func=2 THEN
2270
Readings(R)=Count*256*8^(Exp)
2280
ELSE
2290
Readings(R)=Count*8^(Exp-1)
2300
END IF
2310
NEXT R
2320
PRINT Readings(*)
2330 SUBEND
Continued on Next Page
Appendix C
HP E1326B/E1411B Multimeter Register-Based Programming 251
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com