Xylem STORM 3 Basic Programming manual User Manual
Page 21

19
Commands and Functions
Returns a specified parameter from a connected SDI-12 sensor. The X following the
identifier specifies the SDI-12 sensor’s address. The N or NN denotes the parameter to
return. For example, to request the 3rd parameter from an SDI-12 sensor on address 0, the
identifier SDI03 would be used.
SDI-12 requests and responses are cached to allow quick retrieval of subsequent parameter
requests. To force a new measurement to be made for a sensor, the CLEARSDI( ) function
should be used to clear the SDI-12 cache. Prior to making SDI-12 requests in a Basic
program, the CLEARSDI( ) function should probably be called to force new measurements.
CLEARSDI()
GETVALUE SDI01, sdi1$
REM sets sdi1$ to parameter 1 from sensor 0
GETVALUE SDI312, sdi2$
REM sets sdi12$ to parameter 12 from sensor 3
SDIXN or SDIXNN
Returns a sensor’s most recent processed value. If an unknown sensor is specified, the Error
String (default is -99.99) is returned. Prior processed values can be returned by adding an
additional numerical parameter. The number 1 indicates the most recent measurement, 2
the previous measurement, 3 the value processed three scans prior, etc. Values from SDI-
12 or Basic programs are retrieved by specifying the name of the sensor followed by the
parameter’s name surrounded by parentheses.
GETVALUE SENSOR “H-377”, temp$
GETVALUE SENSOR “H-340SDI(Rainfall)”, stage$
GETVALUE SENSOR “H-340SDI(Rainfall)” 2, previous_stage$
SENSOR
Returns a new counter measurement from the specified Digital port.TheXfollowing the
identifier specifies which digital portis measured.See SetValue to change the counter value
of a specific digital port
.
GETVALUE COUNTER1, c1$ REM sets c1$ to the Digital port’s count
GETVALUE COUNTER2, c2$ REM sets c1$ to the Digital port’s count
COUNTERX
Returns a new measurement from the specified Digital port.A 1 or 0 will be returned based
on the port’s level, 1 indicating the port is high (>3.5V), 0 indicating the port is low (<0.08V).
TheXfollowing the identifier specifies which digital portis measured. See SetValue to change
the level measurement of a specific digital port.
GETVALUE DIGITAL1, d1$ REM sets d1$ to 1 or 0, based on port level
GETVALUE DIGITAL2, d2$ REM sets d2$ to 1 or 0, based on port level
DIGITALX