130 Rockwell Automation Publication 1769-UM022C-EN-P - June 2018
Chapter 8 Elements of a Control Application
Routines
A routine is a set of logic instructions in one programming language, such as
Ladder Diagram (ladder logic). Routines provide the executable code for the
project in a 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 in any of the routines
in the associated program.
Figure 30 - Routines in a Control Application
Figure 31 - Routines in Application
Task 32
Task 1
Configuration
Status
Watchdog
Program 100
Program 1
Main Routine
Fault Routine
Program
(Local Tags and
Parameters)
Other Routines
Controller (global) Tags I/O Data System-shared Data
Controller Fault Handler
Control Application
Controller Designer Logical Designer