beautypg.com

C - automax task execution, Appendix c, Automax task execution – Rockwell Automation 57C650 AutoMax Programming Executive Version 3.8 User Manual

Page 237

background image

CĆ1

AutoMax Task Execution

Appendix C

AutoMax Task Execution

In AutoMax applications that incorporate multiĆtasking, task execution is

determined by eligibility to run. A task's eligibility, in turn, is determined by its

priority, scan time, and any links to other tasks built into the task. This appendix

describes task execution for AutoMax application tasks. Refer to the appropriate

Configuration and Programming instruction manual for a description of the task

execution for UDC tasks.

Priority

Task priority refers to the relative importance of a task in the application. Tasks

whose execution is more critical to the operation of the controlled machinery

should be assigned higher priority. Priority can range from 4 (highest) to 11

(lowest). Priority is specified by the programmer when adding a task to the rack.

Scan Time

Scan time refers to how often the task is scheduled to be executed. It is usually

measured in ticks. You can assign a tick rate for each AutoMax Processor. The

tick rate can range from 0.5 ms to 10.0 ms. The default tick rate is 5.5 ms. See

section 6.1 of this manual for more information. For example, an AutoMax task

with a 20 tick scan time (using the default tick rate) means that the task is

scheduled to start every 110ms.
Scan time is specified differently for PC/Ladder Logic, Control Block, and BASIC

tasks. In each case, before setting the scan time, it is important to know

approximately how long the task takes to execute. For example, a task that takes

20ms to execute cannot be assigned a scan time of 2 ticks because a 20ms task

cannot be started every 11ms. This situation would result in an overlap error

(error code 14 would be displayed on the Processor and all tasks in the rack

would be stopped).
Scan time for PC/Ladder Logic tasks is set using the PC Editor in the Executive

software. The F3 key, followed by I, allows the programmer to enter the scan time.

The screen display will indicate the approximate execution time of the task,

determined by the Executive software. The AutoMax Ladder Logic language

instruction manual contains execution time estimates for each type of Ladder

Logic operation.
For AutoMax Control Block tasks, the scan time is specified in ticks using the

SCAN_LOOP statement. The approximate execution time of the task can be

calculated using the execution time estimates found in the AutoMax Control Block

language instruction manual (JĆ3676).
The scan time for BASIC tasks is usually specified in the START EVERY

statement. The START EVERY statement, which is optional, allows the programer

to use seconds, minutes, and hours, as well as ticks, as the time unit. Note that

there is no simple method of estimating execution time for BASIC tasks ahead of

time. One method of estimating execution time for a specific BASIC task is to

include a statement that turns on a DC output at the beginning of the task (after

the START EVERY statement, if used) and turns it off at the very end of the task.

Then the task is put into run with no other tasks running, and an oscilloscope is

used to measure the time that the output is on.