0 - automax enhanced basic statement types, 1 defining variable control, 0 automax enhanced basic statement types – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual
Page 41

6Ć1
6.0 AutoMax ENHANCED BASIC
STATEMENT TYPES
As described in section 3.1, each BASIC statement begins with a
line number followed by a keyword. The keyword determines what
information will follow on the line. This section describes all the
keywords used in AutoMax Enhanced BASIC grouped by statement
type as follows:
6.1 Defining Variable Control
6.2 Program Documentation
6.3 Variable Assignment
6.4 Transferring Program Control
6.5 Program Looping
6.6 Statements Used for MultiĆTasking Applications
6.7 RealĆTime Control
6.8 Communication
6.9 Error Handling
6.10 Including Other Files
6.11 Stopping Execution
The format of all statements is defined, along with the parameters
required and the permitted variable types. Parameters that are
optional are so noted.
6.1
Defining Variable Control
AutoMax Enhanced BASIC requires that all variables be defined in
the task, i.e., initialized, prior to their use in the task if they must be
at a known state other than 0. See section 4.1.3, Variable Control
Types, for more information about variable control and the initial
state of variables. Arrays must always be defined prior to their use.
Variables are defined using either a LOCAL or COMMON statement.
The storage area required for the variables is automatically set aside
by these two statements.
6.1.1
LOCAL Statement
The LOCAL statement is used to define three kinds of variables, all
of which are local", or accessible to, only the task in which they are
defined. This means that even if the same variable name is used in
another task the values of the two variables are totally independent
of each other. Any operation performed within a task on the variable
has no effect on the variable in the other task. The following types of
variables are defined using the LOCAL statement:
1. Simple variables used only by the task. These variables can be
of any data type and can be written to or read from.
2. Subscripted (array) variables used only by the task. These
variables can be of any data type and can be written to or read
from.