Defining programs defining routines, Defining programs, Defining routines – Rockwell Automation 1794-L34 FlexLogix Controller System User Manual User Manual

Page 73

Advertising
background image

Publication 1794-UM001G-EN-P - January 2007

Develop Applications 73

Notes:

A. The highest priority task interrupts all lower priority tasks.

B. The dedicated I/O task can be interrupted by tasks with priority

levels 1 to 7. The dedicated I/O task interrupts tasks with
priority levels 7 to 15. This task runs at the selected RPI rate
scheduled for the FlexLogix system (5 ms in this example).

C. The continuous task runs at the lowest priority and is

interrupted by all other tasks.

D. A lower priority task can be interrupted multiple times by a

higher priority task.

E. When the continuous task completes a full scan it restarts

immediately, unless a higher priority task is running.

Defining programs

Each program contains program tags, a main executable routine, other
routines, and an optional fault routine. Each task can schedule as
many as 100 programs.

The scheduled programs within a task execute to completion from
first to last. Programs that are not attached to any task show up as
unscheduled programs. You must specify (schedule) a program within
a task before the controller can scan the program.

Defining routines

A routine is a set of logic instructions in a single programming
language, such as ladder logic. Routines provide the executable code
for the project in a controller. A routine is similar to a program file or
subroutine in a PLC or SLC controller.

Each program has a main routine. This is the first routine to execute
when the controller triggers the associated task and calls the
associated program. Use logic, such as the Jump to Subroutine (JSR)
instruction, to call other routines.

You can also specify an optional program fault routine. The controller
executes this routine if it encounters an instruction-execution fault
within any of the routines in the associated program.

Advertising