Auxiliary Operations
XW-210 WiFi™ Users Manual
6.7.5.3 Input Variables
The digital input states can be read in BASIC scripts.
input1
'digital input 1
Example:
Let a = input1
'sets 'a' equal to value of input 1
6.7.5.4 Counter Variables
The input counter can be read in BASIC scripts.
count1
'input 1 counter
Example:
If count1 > 5000 Then
'If input counter 1 is greater than 5000 then
Let relay1 = 1
'turn output 1 on
End If
6.7.5.5 Vin Variable
The vin voltage can be read in BASIC scripts.
vin
'Read the Vin voltage
Example:
If vin > 10 Then
'If Vin is greater than 10 volts then
Let relay1 = 2
'Pulse output 1, otherwise
Else
Let relay1 = 0
'output1 will be off
End If
6.7.5.6 Temperature/Other Sensor Variables
Each temperature sensor or other Xytronix 1-wire sensor can be read in BASIC scripts.
temp1
'temp or other sensor 1
temp2
'temp or other sensor 2
…
temp4
'temp or other sensor 4
Example:
If temp2 >= 80 Then
'If temperature sensor reads greater than 80
' degrees, then
Let relay2 = 1
'Turn on relay 2
End If
6.7.5.7 Date and Time Variables
The variables 'time' and 'date' are predefined, read only variables that store the current date and time.
They can be used to schedule events and activities, such as sending emails, reading temperature, or
setting Outputs. The date uses the mm/dd/yyyy format. Clock time is formatted as hh:mm:ss (24-hour
clock).
Example:
If date = 01/01/2014 Then
If time > 12:30:00 Then
Let relay2 = 1
Let relay3 = 0
End If
End If
Note: Current date and time can only be set in the
Date/Time
tab.
Page 80
Xytronix Research & Design, Inc.
Summary of Contents for WebRelay Wireless XW-210I
Page 1: ......