User`s manual
44 PCL-848AB User's Manual
4.3. Voltage Measurement with a DVM
10 'FILE NAME : EXAMPLE.3
20 'Program Example : VOLTAGE MEASUREMENT WIT)3 A DVM
30 '
40 'Purpose : This program measure 10 voltage readings
50 'and displays them
60 '
70 'Remark : This program is written for the HP3478A DVM. If
80 'another model of voltmeter is used, please check
90 'the operating manual and make necessary
100 'modification to this program.
110 '
120 'Initialization
130 '
140 CLS 150 DEF SEG=&HD000
160 ABORT%=9 : ENTER%=6 : OUTPUT%=3 : STATUS%=42 : TRIG-
GER%=48
170 CALL ABORT%
180 '
190 ‘ Set the DVM
200 '
210 ADDR%=23
220 D$=l’FlT3RAN5'’
230 CALL OUTPUT%(ADDR%,DS) ‘ Send instrument setting string
240 GOSUB 430 250 IF ER%<>0 T13EN PRINT “Error when setting DVM.” : END
260 '
270 'Measurement start
280 '
290 FOR I=1 TO 10
300 CALL TRIGGER%(ADDR%) Trigger the DVM.
310 D$=SPACE$(40)
320 CALL ENTER%(ADDR%,D$) Enter DVM reading
330 GOSUB 430 ‘Error check
340 IF ER%<> 0 TuEN PRINT “Error when reading DVM.” : END
350 PRINT I,D$ .
360 NEXT I
370
380 END
390 '
400 'Error check routine
410 '
420 CONDITION%=8 : ER%=0
430 CALL STATUS%(CONDITION%,ER%) ‘Read the error num’oer
440 IF ER%<>0 TSEN PRINT “Error “;ER%
450 IF ER%=1 T13EN PRINT “Device timeout 1”
460 RETURN
470 '
480 'End of this program