REM REM Datenlogger Rev 1.2 (c) Avisaro AG, 05.01.2008 REM inmode -3 outmode -2 print "Avisaro Logger Rev 1.2 (c) 2008 Avisaro AG" BEGIN: setleds 34 REM Tasten entprellen if KEYS = 1 then goto BEGIN end if let e = 0 open "A", 1, "logdata.txt" if LASTERR <> 0 then open "W", 1, "logdata.txt" if LASTERR <> 0 then goto BEGIN end if end if setleds 115 DIM A(100) do REM Daten von RS232 lesen und auf Karte schreiben INPUT A if BYTESREAD > 0 then setleds 34 put 1, A, BYTESREAD end if REM Periodisches Schließen und Öffnen close 1 open "A", 1, "logdata.txt" setleds 115 if LASTERR <> 0 then close 1 let e = 1 goto FINISH end if REM Beenden ? if KEYS = 1 then close 1 goto FIN_KEY end if loop FIN_KEY: REM Warten bis Taste nicht gedrückt if KEYS = 1 then goto FIN_KEY end if FINISH: setleds 34 REM Warten bis Karte entnommen oder Taste gedrückt let x = loc (0) if (x < 50000) or (KEYS = 1) then goto BEGIN else goto FINISH end if goto BEGIN REM +++