App-18
IM 767361-01E
180 GOSUB *CHECKSYNTAX
‘error check
190 ‘
200 *CAL1
210 PRINT @IO;”CVP1”
‘calibration point = 0
220 PRINT “Set standard equipment output to 0 V.””
230 INPUT “Press Return. “,K$
240 PRINT @IO;”CVD0” :
INPUT WAIT 30,” “,A’calibration point value = 0.00000 (fixed)
250 GOSUB *CHECKSYNTAX
‘error check
260 LINE INPUT @1;D$ :
E$=MID$(D$,5,8)
‘read measured value
270 PRINT “The current measured value is “;E$;” (V).”
280 PRINT “OK? <Y/N>”
290 Q$=INPUT$(1) : PRINT : IF Q$<>”Y” AND Q$<>”y” THEN *CAL1
300 *CAL2
310 PRINT @IO;”CVP2”
‘calibration point = +FS
320 PRINT “Set standard equipment output to 5 V.””
330 INPUT “Input the value output from the standard equipment. -> “,K$
340 PRINT @IO;”CVD”+K$ : INPUT WAIT 30,” “,A ‘set the calibration point value
350 GOSUB *CHECKSYNTAX
‘error check
360 LINE INPUT @1;D$ :
E$=MID$(D$,5,8)
‘read measured value
370 PRINT “The current measured value is “;E$;” (V).”
380 PRINT “OK? <Y/N>”
390 Q$=INPUT$(1) : PRINT : IF Q$<>”Y” AND Q$<>”y” THEN *CAL2
400 *CAL3
410 PRINT @IO;”CVP3”
‘calibration point = -FS
420 PRINT “Set standard equipment output to -5 V.”
430 INPUT “Input the value output from the standard equipment. -> “,K$
440 PRINT @IO;”CVD”+K$ : INPUT WAIT 30,” “,A ‘set the calibration point value
450 GOSUB *CHECKSYNTAX
‘error check
460 LINE INPUT @1;D$ :
E$=MID$(D$,5,8)
‘read measured value
470 PRINT “The current measured value is “;E$;” (V).”
480 PRINT “OK? <Y/N>”
490 Q$=INPUT$(1) : PRINT : IF Q$<>”Y” AND Q$<>”y” THEN *CAL3
500 *CAL4
510 PRINT “The correction coefficient will be calculated, and the result will be
written to the EEPROM.”
520 PRINT “OK? <Y/N>”
530 Q$=INPUT$(1) : PRINT : IF Q$<>”Y” AND Q$<>”y” THEN *CALEND
540 PRINT @IO;”CVP0” :
INPUT WAIT 20,” “,A ‘Writing correction coefficient to EEPROM
550 GOSUB *CHECKSYNTAX
‘error check
560 PRINT “Calibration finished” : GOTO *CALEND
570 ‘
580 *CHECKSYNTAX
‘error checking subroutine
590 POLL IO,STB
‘send serial poll
600 IF (STB AND &H64)<>&H64 THEN RETURN ‘check for syntax error
610 PRINT @IO;”OE” ‘requests output of error number
620 LINE INPUT @IO;D$
‘reads error number
630 PRINT “error occurred. “;D$
640 ‘
650 *CALEND
660 PRINT @IO;”SY0”
‘returns to normal measurement mode.
670
IRESET
REN
‘cancel
remote
680 STOP ‘exit
690 END
Appendix