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

Page 6

Advertising
background image

Basic Programs on the System 5000™ can be used as either Inputs or Outputs and operate in the

same manner, being executed according to their associated Task’s priority. The System 5000™’s

sequence of operations is as follows:

Process all Task Inputs (according to Task Priority)

Process all Task Outputs (according to Task Priority)

As Task Inputs are executed sequentially based on priority, when a Basic Input Program begins,

all Tasks with higher priorities will have newly measured values. Tasks with lower priorities,

however, will still contain the previous scan’s values as they have not been run yet.

Basic Output Programs, on the other hand, will have full access to all newly measured values as

all Task Inputs have been run prior to the first Task Output being called.

Program Execution

BASIC FEATURES & FUNDAMENTALS

Basic 5000 programs are parsed and checked before and during execution. If any syntax errors

are found in the code, the Basic Program will be skipped and the System 5000™ will continue its

operations. If any runtime errors are found during execution, the program will exit at that point

and the System 5000™ will continue its operations.

To assist with troubleshooting a Basic program, the Basic Management and Basic Program

Input/Output screens contain a “Debug” mode that allows line by line execution of the chosen

Basic Program with detailed reporting of variables and all related output. Any errors that are

reported should be resolved before implementing the program into the System 5000™’s schedule.

Error Handling

4

The examples provided below will follow certain patterns when presented. All Basic 5000

statements will be capitalized while all variables and strings may contain both uppercase and

lowercase lettering. Though this form is used, the Basic 5000 Interpreter is not case-sensitive

with respect to commands/statements (however, variables are case-sensitive). In other words, the

“PRINT”, “Print”, and “print” statements are all interpreted as valid PRINT commands.

PRINT “Hello World”

Print “Hello World”

print “Hello World”

Grammar

Advertising