Rtrim$ (string), Scanrate, Seconds – Xylem System 5000 BASIC Manual User Manual
Page 43: Seek

41
Basic Commands and Functions
Returns the given string with all whitespace removed from only the right side.
PRINT RTRIM$(“ Hello World “) REM prints “ Hello World”
RTRIM$ (string)
Used in conjunction with the GETDB command, SCANRATE requests the given Task’s scan
rate and stores it in the given variable. The scan rate is given in seconds.
Used in conjunction with the SETDB command, SCANRATE sets the given Task’s scan rate to
the given value. The scan rate should be specified in seconds.
GETDB SCANRATE “myTask”, var REM stores the scan rate of Task “myTask”
REM
in
the
var$
variable
SETDB SCANRATE “myTask”, 120 REM sets the scan rate of “myTask”
REM
to
2
minutes
(120
seconds)
SCANRATE
A parameter to the DATETIME function returning a two-digit number representation of the current
seconds, formatted as SS.
var = DATETIME(SECONDS) REM stores 59, inferring the 59th second
SECONDS
Sets the position from which the next INPUT statement will read from within an open file. The
first parameter is the open file, the second parameter tells where to set the next read position, and
the third is an optional setting of either “BEGINNING”, “CURRENT”, or “END”. “BEGINNING” sets the
count from the beginning of the file (and is the default if not specified), “CURRENT” counts from
the current read position from within the file, and “END” counts from the end of the file. The TELL
command retrieves the current read position of the given file.
myTask Analog2 WindSpeed
56.23 2.25 126.5
OPEN “SiteID.csv” FOR READING AS #1
SEEK #1, LEN(“myTask”)
REM sets our position to Analog2
INPUT #1 “\t”, var$
SEEK #1, -11, “END” REM sets our position to the Analog2 measurement
INPUT #1 “\t”, var2$
PRINT var$, “ is “, var2$
REM prints “Analog2 is 2.25”
CLOSE #1
SEEK