Xl™ series – Xylem XL-BASIC Programming Guide User Manual
Page 11

XL™ SERIES
XL-BASIC Programming Guide 23-11
--- Sensor Input / Misc I/O Functions —
MEASURE(x)
Measure selected input. Some inputs are normally only measured once per
scan in order to speed program execution, and to make sure all secondary
actions using the input value do so using the same value, as a second
measure operation may result in slightly different values. If it is desirable
to measure an input again, then this command must be used. Inputs that
normally only get measured only once per scan are the analog inputs, the
stage input, the PtTemp input the PSI input, and the SDI-12 inputs. Other
input variables like battery or seconds will be updated each time they are
used.
x = Ana1 to Ana4, Stage, PtTemp, psi, SDIap, FntXX etc.
VXON
Turns the 5.0 volt excitation on.
VXOFF
Turns the 5.0 volt excitation off.
P12VXON
Turns on the 12 volt excitation if it was off. (Only valid on Hardware Rev
N and newer. On older revisions the 12 volt excitation was always on).
P12VXOFF
Turns off the 12 volt excitation if it was on. (Only valid on Hardware Rev
N and newer. On older revisions the 12 volt excitation was always on).
SETDIGx
Set digital output x (1 or 2) to a high state. The digital I/O must be
configured as an output or this will have no affect.
CLEARDIGx
Turn off digital output x (1 or 2).
Example:
if stage > 10 then setdig1
CURRENTLOOP(x) Sets the 4 to 20 mA output current to ‘x’ where ‘x’ is between 4 and 20.
Values greater than 20 will result in an output of 20 mA and values less
than 4 will result in an output level of 4 mA.