Commands and functions, Chr$ (number), Clearsdi ( ) – Xylem STORM 3 Basic Programming manual User Manual
Page 14: Close, Continue

12
COMMANDS AND FUNCTIONS
Returns the number’s ASCII character representation. ASC( ), converting a character to its ASCII
numerical value, is the opposite function of CHR$( ).
var$ = CHR$(65) REM sets var to A
var = ASC(“A”) REM sets var to 65
CHR$ (number)
Clears the SDI-12 cache. Prior to a Basic program running, the SDI-12 cache is empty. All Basic
programs share the same SDI-12 cache. When an SDI-12 value is retrieved, a cache of the query
and response is recorded. When a subsequent request is made, if the cache has the information
available, the stored data is returned. To retrieve new measurements each scan, the cache should
be cleared prior to retrieving fresh SDI-12 readings.
CLEARSDI() REM Clear any cached SDI values
GETVALUE SDI01, a1$ REM request a new measurement (address 0, param 1)
GETVALUE SDI02, a2$ REM retrieve the second parameter (from the cache)
CLEARSDI() REM Force our next request to be a new measurement
GETVALUE SDI01, b1$ REM request a new measurement (address 0, param 1)
CLEARSDI ( )
Closes a file or serial port that has been previously opened with the OPEN command.
OPEN “RS-232 COM” AS #9
CLOSE #9
OPEN “RS-485” AS #6
CLOSE #6
CLOSE
Used to begin the next iteration of a FOR, WHILE, REPEAT, or DO loop, skipping over the
remainder of the loop
.
sum = 0
FOR var = 1 TO 5
IF (var = 3) CONTINUE REM when var = 3, skip the next statement
sum = sum + var REM sets sum to 12 (1 + 2 + 4 + 5)
NEXT var
CONTINUE