Xylem STORM 3 Basic Programming manual Manual de usuario Pagina 44

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 48
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 43
42
EXAMPLE PROGRAMS
REM Prints out the last line of the log file to the RS-232 Com port
REM When set up to run with the sensors, prints out their values every scan
LogFile$ = “SiteID.csv”
OPEN LogFile$ FOR READING AS #1
SEEK #1, 0, “END”
leSize = TELL(#1)
filePosition = TELL(#1)
fileError = 0
foundEnd = 0
IF (filePosition < 150) THEN
REM The first search should begin at the start
SEEK #1, 0, “BEGINNING”
ELSE
REM Note that this is presuming that each log line is less than 150 characters long
SEEK #1, -150, “END”
END IF
WHILE (foundEnd == 0 and fileError == 0)
LINE INPUT #1, LastLogLine$
filePosition = TELL(#1)
IF (lePosition == leSize) THEN
foundEnd = 1
END IF
WEND
CLOSE #1
SETPORT 9600, 8, none, 1, none, 50, 0
OPEN “RS-232 Com” AS #2
PRINT #2 LastLogLine$, “\r\n”
CLOSE #2
AutoPrint.bas
The following programs are provided for reference when creating and using the Basic interpreter.
Vista de pagina 43
1 2 ... 39 40 41 42 43 44 45 46 47 48

Comentarios a estos manuales

Sin comentarios