Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 26

Advertising
background image

4Ć6

an application task allocates space for 21 string values of 10

characters each. Note that if no length is specified in the initial array

reference, the default maximum is 31.
To define an array that will be common, i.e., accessible to all tasks in

the rack, you need to first define the variable. If you are using

AutoMax Version 2.1 or earlier, this is done with a MEMDEF or

NVMEMDEF statement in the configuration task for the rack. If you

are using AutoMax Version 3.0 or later, common variables are

defined within the Programming Executive. For example,

ARRAY1@(10) will allocate space for 11 boolean variables. Then, in

an application task for the rack, you declare the array a COMMON

variable as follows:

COMMON ARRAY1@(10). Each element of the array that will be

used in the task can be defined with LET statements as follows:

LET ARRAY1@(0) = TRUE (boolean values can only be

TRUE/FALSE or ON/OFF). Other application tasks in the rack can

access the value in variable ARRAY1@(0) simply by declaring it a

COMMON variable.

4.1.3

Variable Control Types

The control type of a variable refers to the way the variable is

declared or defined in the configuration and application tasks. There

are two control variable types in AutoMax systems, local and

common.
1. Local

Local variables are variables that are not defined in the rack

configuration and are therefore accessible only to the

application task in which they are defined. BASIC and Control

Block tasks must define the variables with a BASIC LOCAL

statement. For Ladder Logic/PC tasks, the editor prompts for

whether the variable is local or common when the task is being

created.
In BASIC and Control Block tasks, local variables can be

defined as tunable. Tunables are variables whose value can be

tuned, i.e., changed within limits, by the operator through the

OnĆLine menu of the Executive software. The value of tunable

variables can also be changed by application tasks by using the

BASIC languange WRITE_TUNE function. BASIC and Control

Block tasks must define tunable variables with a variation of the

BASIC LOCAL statement that includes the tuning parameters.

Ladder Logic/PC tasks cannot use tunable variables.
The value of local variables at the time of initial tasks installation

is always 0. The effect of a Stop All or a power failure on variable

values in the rack depends on the variable type. Local tunable

variable values in both AutoMax and UDC application tasks is

always retained. Local variable values are retained for AutoMax

tasks, but not for UDC tasks.
AutoMax Processors will retain the last values of all local

variables. UDC modules will retain the variable values for the

following: parameter configuration data, UDC test switch

information, and D/A setup configuration. The variable values of

the following input data will also be retained: feedback registers,

UDCĆPMI communication status registers, and UDC task error

log information. UDC modules will NOT retain local variable

values and data found in the following registers, which are

Advertising
This manual is related to the following products: