Commands and functions, Delay, Else – Xylem STORM 3 Basic Programming manual User Manual
Page 16

14
COMMANDS AND FUNCTIONS
CASE 15:
path = 2
BREAK
CASE 30:
path = 3
BREAK
CASE 45:
path = 4
BREAK
DEFAULT:
path = -1
BREAK
END SWITCH
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
DELAY
Begins an infinite loop encompassed by DO and LOOP. A BREAK or GOTO statement should be
used to leave the loop.
DO
REM Break out of the loop when our seconds are greater than 30
x = DATETIME(SECONDS)
IF (x > 30) BREAK
LOOP
DO
Optionally used as part of an IF statement to indicate a default branch if no other conditions are
evaluated as TRUE.
var = DATETIME(MINUTES)
sync = 0
IF (var == 0) THEN
sync = 1
ELSE
sync = -1
ENDIF
ELSE