Basic features & fundamentals – Xylem System 5000 BASIC Manual User Manual
Page 10

8
BASIC FEATURES & FUNDAMENTALS
Basic 5000 provides a number of commands that allow for string manipulation and processing.
Functions that return string variables contain a trailing “$” whereas functions returning number
variables do not have a “$”. Functions such as LEFT$, MID$, and RIGHT$ can be used for
extracting parts of a string. Separating a string into usable sections can be done with TOKEN
and SPLIT. Converting strings to numbers and numbers to strings can be quickly accomplished
with the STR$ and VAL functions. The “+” operator may also be used to concatenate strings.
There are many other string functions available including ASC, CHR$, HEX$, INSTR, LEN,
LOWER$, MID$, UPPER$ that may be used to manipulate strings and their contents.
String Processing
Basic 5000 programs can be easily installed by pressing the Add New Program function button
on the Basic Program Management screen found under System Setup’s Inputs & Outputs menu.
Simply select a displayed program on the Basic Program Install screen and press the Install
button. Programs must have a .bas extension to be shown under the Basic Program Install menu.
Once a program has been installed and/or set up, the program will become available within the
respective Input, Output, and Listening Port menus. To view the program’s properties, modify
the availability of the program, or change the name under which it appears, use the Basic
Program Management.
Installing Basic Programs
Built within Basic 5000 are a number of commands that allow greater access to both the
hardware and the software side of the System 5000™ . Most of these commands are identified
by their GET and SET prefixes:
GETDB: Retrieves system settings saved within the database
GETSDI: Sends an SDI command and retrieves the resulting response
GETTASK: Retrieves current and previously measured values of an existing Task
GETTIMESTAMP: Retrieves current and previous timestamps for measured Tasks
GETVALUE: Retrieves a new measurement from attached hardware
SETDB: Modifies system database settings
SETPOWER: Modifies hardware power settings
SETNETWORK: Modifies network (ethernet) settings
SETTASK: Modifies the most recent measured value of an existing Task
SETTIMESTAMP: Modifies the most recent timestamp for a measured Task
SETVALUE: Modifies current hardware settings
For further information on the above commands as well as examples of their use and valid
parameters for each, please refer to each of the respective commands on the following pages.
System 5000™ Integration