XW-210 WiFi™ Users Manual
6.7.3 Supported Statements
The following are the statements supported by the ControlByWeb™ BASIC interpreter.
LET
The LET statement assigns a variable a value. The format is:
LET (variable) = (expression)
IF THEN, ELSE, END IF
The IF THEN statement tests the truth of a condition. The ELSE statement defines a second function if
the condition is found false. In other words, if the condition is true, then a function is performed. If it is not
true, a second function may be performed. The second function may or may not be necessary depending
on the application. The IF THEN (ELSE) statement must always be followed with an END IF statement.
The format is:
IF (variable) (=, <, >, <=, >=, <>) (expression) THEN
(Function 1)
ELSE
(Function 2)
END IF
Note: In most BASIC interpreters, 'Function 1' (see above) may be placed after the THEN statement.
This interpreter requires 'Function 1' to be put on the following line.
FOR TO, NEXT
The FOR TO statement loops a section of code a predefined number of times. The NEXT statement
always follows the section of code to be looped. The format is:
FOR (variable) = (expression) TO (expression)
(code to be looped)
NEXT (variable)
DO WHILE, LOOP
The DO WHILE statement loops a section of code while a condition is found true. The LOOP statement
always follows the section of code to be looped. Note that if the condition is omitted, the code will be
looped without end. The format is:
DO WHILE (variable) (=, <, >, <=, >=, <>) (expression)
(code to be looped)
LOOP
Example:
let t0 = 100
do while t0 > 0
' wait
loop
LOG
The LOG statement causes the device to log data according to the settings specified under the
Logging
setup tab
.
Note: In order to log, logging must be enabled in the Logging setup tab.
The format is: LOG
Xytronix Research & Design, Inc.
Page 77
Содержание WebRelay Wireless XW-210I
Страница 1: ......