2 automax application tasks – Rockwell Automation 57C610 Enhanced Basic Language, AutoMax User Manual

Page 14

Advertising
background image

2Ć2

The configuration task does not actually execute or run; it serves as

a central storage location for systemĆwide information. Note that

local variables, those variables that do not need to be accessible to

more than one task, do not need to be defined in the configuration

task. Refer to JĆ3649 for more information about configuration tasks.

2.2

AutoMax Application Tasks

AutoMax Processors allow realĆtime concurrent operation of multiple

programs, or application tasks, on the same Processor module. The

tasks are executed on a priority basis and share all defined system

data. Application tasks on different Processor modules in the rack

are run asynchronously.
Each task operates on its own variables. The same variable names

may be used in different tasks, but each variable is only recognized

within the confines of its task unless it is specifically designated a

COMMON variable. Changing local variable ABC% (designated

LOCAL) in one task has no effect on variable ABC% in any other

task.
MultiĆtasking in a control application can be compared to driving a

car. The programmer can think of the different functions required as

separate tasks, each with its own priority.
In driving a car, the operator must monitor the speedometer,

constantly adjust the pressure of his foot on the gas pedal, check

the rearview mirror for other traffic, stay within the boundaries of his

lane, etc., all while maintaining a true course to his destination. All of

these functions have an importance or priority attached to them,

with keeping the car on the road being the highest priority. Some

tasks, like monitoring the gasoline gauge, require attention at

infrequent intervals. Other tasks require constant monitoring and

immediate action, such as avoiding obstacles on the road.
In a control application the Processor needs to be able to perform

calculations necessary for executing a control scan loop, monitor an

operator's console, log error messages to the console screen, etc.

Of these tasks, executing the main control loop is obviously the

most important, while logging error messages is the least important.

MultiĆtasking allows the control application to be broken down into

such tasks, with their execution being dependent upon specified

events," such as an interrupt, operator input, or the expiration of a

time interval.
The following table is a representation of typical tasks found in a

control application and the kind of event that might trigger each.

Task

Triggering Event

Execute main control loop

Expiration of a hardware

timer that indicates the

interval at which to

begin a new scan

Respond to external I/O input

Generation of a hardware

interrupt by an input module

Read operator data

Input to an operator panel

Log information

Expiration of a software timer

Advertising
This manual is related to the following products: