Appendix
App-17
IM 767361-01E
490 ‘
500
IRESET
REN ‘cancel
remote
510
STOP
‘exit
520 END
10 ‘*************************************************************************
20 ‘* Program that reads/displays the measured data 10 times (RS-232) *
30 ‘*************************************************************************
40 ‘
100 OPEN “COM:N81NN” AS #1
‘open line
110 PRINT #1,CHR$(&H1B)+”R”
‘set remote
120 ‘
130 PRINT #1,”PU4”
‘pressure units = kPa
140 PRINT #1,”H1”
‘communications output data header present
150 PRINT #1,”DL0”
‘communications output delimiter=CR+LF
160 ‘
170 FOR I=1 TO 10
‘read measured data ten times
180 INPUT WAIT 10,” “,A
‘wait (random)
190 PRINT #1,”OD”
‘measured data output request
200 LINE INPUT #1,D$
‘read measured data
210 PRINT D$
‘display measured data
220 NEXT I
230 ‘
240 ‘
300 ‘******************************************************************
310 ‘* Program that reads data using trigger and serial poll (RS-232) *
320 ‘******************************************************************
330 ‘
340
#1,”HD1”
‘data
hold
350 ‘
360 PRINT #1,”IM1”
‘status byte mask
370 PRINT #1,CHR$(&H1B)+”S”
‘status byte initialization
380 LINE INPUT #1,B$
390 ‘
400 FOR I=1 TO 10
‘read measured data ten times
410
#1,”E”
‘activates
trigger.
420 PRINT #1,CHR$(&H1B)+”S”
‘read status byte
430 LINE INPUT #1,B$
440 STB=ASC(LEFT$(B$,1))
450 IF (STB AND &H41)<>&H41 THEN 420
‘check whether measurement has finished
460 PRINT #1,”OD”
‘measured data output request
470 LINE INPUT #1,D$
‘read measured data
480 PRINT D$
‘display measured data
490 NEXT I
500 ‘
510 PRINT #1,”HD0”
‘release data hold
520 ‘
530 PRINT #1,CHR$(&H1B)+”L”
‘cancel remote
540
CLOSE
#1
‘close
line
550 ‘
560
STOP
‘exit
570 END
10 ‘***********************************************************
20 ‘* DMM calibration program (voltage calibration) *
30 ‘***********************************************************
40 ‘
100 ISET IFC ISET REN
‘set remote
110
CMD
DELIM=0:
IO=1
‘address=1
120 ‘
130 POLL IO,STB
‘status byte initialization
140 PRINT @IO;”IM4”
‘status byte mask
150 ‘
160 PRINT @IO;”SY1” :
INPUT WAIT 10,” “,A
‘enter calibration mode
170 PRINT @IO;”CAL1”
‘ calibrating the voltage
Appendix