10 CLS : SCREEN 9 20 REM entete nummes%=rang de la mesure,mesure%=valeur de la mesure 30 REM xorig%= origine de l'axe x pour le trac‚ 40 REM vit variable tempo ,d‚pend du pc!!! nummes% = 1 xorig% = 1 mesure% = 0 PRINT " PROGRAMME DE LECTURE DES DONNEES" PRINT " acquises par le port parallele ,avec un max 187" PRINT " --------------------------------------" PRINT PRINT PRINT "VITESSE DE LECTURE de 0 = tres rapide " PRINT "A 100000 = 1 mesure toutes les 10 secondes " PRINT "EN COURS D'EXECUTION :LA VITESSE PEUT ETRE VARIEE < v > OU < l >" PRINT "LES LECTURES PEUVENT ETRE STOPPEES PAR < q >" PRINT "EN FIN DE LECTURE LE PROGRAMME PEUT ETRE STOPPE PAR < f >" INPUT "VITESSE :", vit PRINT PRINT INPUT "DATE DU FICHIER A LIRE : ", dat$ nomdefichier$ = "c:\don\" + "do" + dat$ + ".dat" OPEN nomdefichier$ FOR INPUT AS #1 100 REM boucle principale INPUT "DEMARRER LA LECTURE ? ", rep$ IF rep$ = "o" OR rep$ = "O" THEN GOTO 130 ELSE GOTO 120 120 CLOSE #1: END 130 GOSUB 200 150 GOSUB 700 170 GOSUB 400 180 GOSUB 500 190 com$ = INKEY$: IF com$ = "q" THEN GOTO 120 191 IF com$ = "v" THEN vit = vit - 100 192 IF com$ = "l" THEN vit = vit + 100 198 GOTO 150 199 END 200 REM affichage entete page graphique CLS LOCATE 3, 30: PRINT "MESURE du :", 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 "TEMPS>" RETURN 400 REM lecture des mesures INPUT #1, nummes%, mesure%, temps$ IF EOF(1) THEN GOSUB 800 RETURN 500 REM affichage resultat et trace courbe xorig% = nummes% - (550 * (INT(nummes% / 550))) IF xorig% = 549 THEN GOSUB 200 LOCATE 3, 10: PRINT "MES:"; nummes%, "VAL:"; mesure%; "mv ", temps$ LINE (xorig% + 50, 350)-(xorig% + 50, 350 - (mesure% / 17)), 10 RETURN 700 REM boucle tempo FOR x = 0 TO vit NEXT x RETURN 800 REM boucle pour maintenir/arreter l'affichage stop$ = INKEY$ IF stop$ = "f" THEN GOTO 120 GOTO 800