Basic commands & functions – Xylem System 5000 BASIC Manual User Manual
Page 50

48
BASIC COMMANDS & FUNCTIONS
Returns the current read position of the given file number.
Presuming SiteID.csv contains:
Digital2,AC-In
1,256.25
OPEN “SiteID.csv” FOR READING AS #1
INPUT #1, var$
PRINT var$ REM prints “Digital2,AC-In”
PRINT TELL(#1)
REM prints “15”
SEEK #1, -6, “CURRENT”
PRINT TELL(#1)
REM prints “9”
INPUT #1, var$
PRINT var$ REM prints “AC-In”
CLOSE #1
TELL (filenumber)
Used in conjunction with the GETVALUE command, TEMP requests a new measurement to be
made of the internal temperature and stores the value in the given variable.
GETVALUE TEMP, var
REM stores a new measurement of the internal
REM temperature in the var variable
TEMP
Used with the IF statement to specify a multi-line IF-THEN clause.
var = 250
IF (var >= 500) THEN
PRINT “Very Large number”
ELSEIF (var >= 250) THEN
PRINT “Large number”
REM prints “Large number”
ELSE
PRINT “Small number”
ENDIF
THEN
A parameter to the DATETIME function returning a six-digit number representation of the current
time, formatted as HHMMSS.
var = DATETIME(TIME)
REM stores 53237, inferring 05:32:37
TIME