beautypg.com

Commands and functions – Xylem STORM 3 Basic Programming manual User Manual

Page 36

background image

Sets a sensor’s function, specified by the Use Function option under the Processing section

of the Storm’s Sensor Setup screen. Setting a sensor’s function will automatically enable

the function for use as well. If an unknown sensor is specified, an N/A is returned. Functions

from SDI-12 or Basic programs are retrieved by specifying the name of the sensor followed

by the parameter’s name surrounded by parentheses.

SETVALUE SENSORFUNCTION “H-377”, “H377C(X)”

SETVALUE SENSORFUNCTION “H-340SDI(Rainfall)”, “0”

34

COMMANDS AND FUNCTIONS

SENSORFUNCTION

Splits apart a string into an array of strings. The first parameter provides the string to split apart.

The second parameter provides the array which the new substrings will fill. The optional third

parameter provides the delimiters or characters that determine where to split the primary string. If

more than one delimiter is specified, splitting will occur at each character given. For example, if a

comma and hyphen are given “,-”, content will be split on any commas or hyphens found as in the

example below. If no delimiter is specified, whitespace will be used as the delimiter (e.g. spaces

and tabs). The number of strings found is returned.

Returns -1, 0, or 1 indicating the sign (negative, zero, or positive respectively) of the given number.

var = SGN(-32.645) REM sets var to -1

var = SGN(1023.98) REM sets var to 1

SGN (number)

Returns the sine value of the given number.

var = SIN(PI/2) REM sets var to 1

var = SIN(0) REM sets var to 0

SIN ( )

Causes the program to pause execution for the specified number of seconds. A decimal number

may be used to specify more specific and smaller time increments (e.g. milliseconds). SLEEP and

DELAY are identical commands.

SLEEP 2.5

REM pauses the program for 2.5 seconds

DELAY 0.25 REM pauses the program for 0.25 seconds

SLEEP

SPLIT (string, array, string)