beautypg.com

Xylem System 5000 User Manual User Manual

Page 85

background image

Basic 5000

83

Basic Programs can be debugged by

pressing the Debug button available

through both the Basic Program

Management screen as well as Basic

Program Properties screens accessible

through editing any Task using a Basic

Program. Note that special Entry Points

within a program may cause it to be unable

to be debugged (as the debug program

won’t be able to test each Point). Entry

Points should only be added to a program

after the individual segments have been

tested.

Debugging a basic program

Lists the Basic Program’s filename. Below this label is a window revealing the actual Basic Program

with line numbers next to each line. More of the program can be displayed on the screen by

pressing the Toggle View button until only the Program is shown, filling the entire

screen area.

Program

Lists the current variables and their values being used within the Basic Program as well as any

output being printed from the program. Any errors will also appear in this window. This window

can also fill the entire screen by pressing the Toggle View button.
To Start debugging a Basic Program, press the Start Program button in the bottom left corner. A

syntax check is first performed to verify the program has been coded appropriately. If any

errors are found, they will be printed in the Variables/Output window. After the syntax check has

completed, the program will be ready to run and the first line will be highlighted.
To run only the highlighted line, press the Run Next Line button. To run until a future line, select

a line further down in the program and notice how the Run to Prog End button has changed to

Run to Line n where n is the selected line number. Pressing this button will run each line of the

program until the selected line is reached. Pressing the Run to Prog End button will run the Basic

Program until it has completed. To force quit a program at any time, press the Stop button in the

bottom left corner.
The Toggle View button alternates views of the windows shown, allowing each to entirely fill the

screen or be side by side within the screen.

Variables / Output