10 CLS : SCREEN 9
20 REM nummes%=measure number,mesure%=value of measure
30 REM xorig%= origin of x axis
40 REM vit=speed depends of pc
nummes% = 1
xorig% = 1
mesure% = 0
PRINT " DATA ACQUISITION"
PRINT " with a max 187"
PRINT " -------------------"
PRINT
PRINT
INPUT "DATE < jjmmaa >", dat$
PRINT "speed of ACQUISITION 0 = very fast 100000 slow"
PRINT "speed can be modified by < v >ou < l >"
INPUT "speed :", vit
nomdefichier$ = "c:\don\" + "do" + dat$ + ".dat"
PRINT " STOP =< q >"
PRINT "data are stored in file :", nomdefichier$
OPEN nomdefichier$ FOR OUTPUT AS #1
PRINT
PRINT
100 REM main loop
INPUT "START ? < O / N > ", rep$
IF rep$ = "o" OR rep$ = "O" THEN GOTO 130 ELSE GOTO 120
120 CLOSE #1: END
130 GOSUB 200
150 GOSUB 700
160 GOSUB 300
170 GOSUB 400
180 GOSUB 500
190 nummes% = nummes% + 1
192 com$ = INKEY$: IF com$ = "q" THEN GOTO 120
193 IF com$ = "l" THEN vit = vit + 100
194 IF com$ = "v" THEN vit = vit - 100
198 GOTO 150
199 END
200 REM graphics
CLS
LOCATE 3, 30: PRINT "DATE OF MEASURE:", dat$
LOCATE 11, 77: PRINT "4v"
LOCATE 25, 77: PRINT "ov"
LOCATE 11, 2: PRINT "V"
LOCATE 13, 2: PRINT "O"
LOCATE 15, 2: PRINT "L"
LOCATE 17, 2: PRINT "T"
LOCATE 19, 2: PRINT "S"
LOCATE 25, 1: PRINT "Time>"
RETURN
300 REM measures accum%=result ,
302 REM subroutine from rs publishing
accum% = 0
OUT 888, 1
OUT 888, 0
OUT 888, 2
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = 2048
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 1024
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 512
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 256
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 128
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 64
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 32
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 16
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 8
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 4
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 2
OUT 888, 0
OUT 888, 2
IF (INP(889) AND 32) > 0 THEN accum% = accum% + 1
OUT 888, 2
OUT 888, 0
OUT 888, 2
OUT 888, 0
OUT 888, 1
mesure% = accum%
RETURN
400 REM record of measure on file
WRITE #1, nummes%, mesure%, TIME$
RETURN
500 REM draw curve
xorig% = nummes% - (550 * (INT(nummes% / 550)))
IF xorig% = 549 THEN GOSUB 200
LOCATE 3, 10: PRINT "MES:"; nummes%; "VAL:"; mesure%; "mv ", TIME$
LINE (xorig% + 50, 350)-(xorig% + 50, 350 - (mesure% / 17)), 9
RETURN
700 REM temporisation
FOR x = 0 TO vit
NEXT x
RETURN