beautypg.com

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

Page 17

background image

XL™ SERIES

XL-BASIC Programming Guide 23-17

WRITESDI

This command is used to send text out the SDI-12 port to smart sensors.
The command is preceded with a standard SDI-12 break. If the response is
not recognized then normal SDI-12 retries will be sent. Normally the first
character of the string is the address of the sensor the message is meant
for, and if this address matches a standard SDI-12 address that has been
redirected to a serial port, then this command will be sent out the serial
port and not the SDI-12 port. The string format for this command is much
the same as the ‘print‘ command.
Example:

writesdi “0I!”

PRINTSDI

This command is used to send text out the SDI-12 port to smart sensors.
Proper SDI-12 timing is used but the command is only sent one time, no
retries are sent if the response is not recognized. This is always sent out
the SDI-12 port even if the address has been redirected. The string format
for this command is much the same as the ‘print‘ command.
Example:

printsdi “0I!”

GETSDIDATA “string”

This command is normally used to send a measurement command
as a text string out the SDI-12 port to smart sensors and then
collects the data from the sensor and stores it in variables a to i.
This allows the logger to collect data from sensors that have
addresses other than the ten allowed for in the normal menu
options. The command is preceded with a standard SDI-12 break.
If the response is not recognized then normal SDI-12 retries will be
sent.
Example:

getsdidata “aM!”

SETTIMEOUT(x)

This command is used to set the system timeout period. It can be set from
15 to 600 seconds.

SCANRT()

This command gets the current scan rate in seconds.
Example:

a = scanrt()

SETSCANRT(x)

This command is used to change the scan rate. This may be used to speed
up the scan rate based on some predefined condition. For example if the
stage is greater than some level then scan at a faster than normal rate.
Example:

if stage>10 then setscanrt(300)