Xylem XL-BASIC Programming Guide User Manual

Chapter 23 xl-basic programming guide, Xl™ series

Advertising
background image

Chapter 23

XL-BASIC Programming Guide

XL™ SERIES

XL-BASIC Programming Guide 23-1

Version Changes (available on version 2.07 of the XL series data logger)

!

Changes to the ‘input’ command to not change the variable value if no input was received

!

Added ‘printsdi’ command, print to the SDI-12 port without any retries.

!

Added ‘p12vxon’ command, turn on the 12 volt excite, (Only available on newer
hardware).

!

Added ‘p12vxoff’ command, turn off the 12 volt excite, (Only available on newer
hardware).

!

Added ‘settimeout (x)’ command, set the system time out value from 15 to 600 seconds.

!

Added ‘opencom2’, ‘print2’ and ‘closecom2’ commands, allows printing to com port
two.

!

Added ‘logvalx’ variable, an indirect variable normally based on a log column function.

!

Added ‘reset’ variable, returns the number of times the system has reset.

!

Described the ‘basicx’ variable.

Version Changes (available on version 2.10 of the XL series data logger)

!

Added input commands for com port 2 and 3

!

Added fluchcom1, flushcom2, and flushcom3 commands.

!

Updated This document.

XL-BASIC Programs:

The XL™ series data loggers have a built in BASIC interpreter for handling specialized
operations outside the normal use of the data logger. Since this BASIC interpreter is specific to
the XL™ series of data loggers it is called XL-BASIC. XL-BASIC handles many of the standard
BASIC commands, but also provides access to the I/O and other features of the XL™ series data
logger.

Basic1 to Basic5

There are five basic programs that can be called any time the system is

collecting data to log or to send to the GOES radio, etc. To execute one of the five programs,
select it from the source list just as “Stage” or “Ana1" is selected. Each XL-BASIC program has
a defined variable that will be used as a return value for the function that caused the XL-BASIC
program to execute. For example, as the system processes the data to log, it looks at the source
for each column. The first column is normally set to “Date” so the current date is placed in
column 1. Column 2 is normally time and a time stamp is placed in this column. If column 3
source was set to “Basic1", then the BASIC 1 program would execute and the value in variable
“Basic1" would be placed in the third column.

A BASIC program is written using a standard text editor on a PC and then loaded into the XL
series data logger. Each BASIC program must be 8K bytes or less in size. The size of the

Advertising