User manual
Publication 1768-UM001C-EN-P - November 2007
72 Develop Applications
Specifying Task Priorities
Each task in the controller has a priority level. The operating system uses the
priority level to determine which task to execute when multiple tasks are
triggered. You can configure periodic tasks to execute from the lowest priority
of 15 up to the highest priority of 1. Higher-priority tasks interrupt any
lower-priority tasks. Periodic tasks take priority and always interrupt
continuous tasks, which have the lowest priority.
Defining Programs
Each program contains program tags, a main executable routine, other
routines, and an optional fault routine. Each task can schedule up to
32 programs.
Scheduled programs within a task execute to completion from first to last.
Programs 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.
Unscheduled programs within a task are downloaded to the controller with the
entire project. The controller verifies unscheduled programs, but does not
execute them.
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 resembles 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.