270
Rockwell Automation Publication 1769-UM021G-EN-P - October 2015
Chapter 10
Develop Applications
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. A routine is similar to a program file or subroutine in a
PLC or SLC
™
processor.
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 47 - Routines in a Control Application
Figure 48 - Routines in Application
Control Application
Controller Fault Handler
Task 32
Task 1
Configuration
Status
Watchdog
Program 1000
Program 1
Main Routine
Fault Routine
Program (Local
Tags and
Parameters)
Other Routines
Controller (global)
Tags
I/O Data
System-shared Data
Routine
Routine
Routine
Routine
Controller Designer
Logical Designer