Enabling scan modes – Rockwell Automation Logix5000 Controllers Add-on Instructions Programming Manual User Manual
Page 50

Chapter 2
Defining Add-On Instructions
Scan Mode
Description
Prescan
Occurs when the controller either powers up in Run mode or transitions from Program to Run.
Instructions in the controller may or may not have logic that executes only when that instruction is
executed in Prescan mode.
Postscan(1)
Occurs as a result of an Action in a Sequential Function Chart (SFC) routine becoming inactive if SFCs
are configured for Automatic Reset. Instructions in the controller may or may not have logic that
executes only when that instruction is executed in Postscan mode.
(1) Postscan mode routines cannot be created for safety Add-On Instructions because safety
instructions do not support SFC.
The default behavior for executing an Add-On Instruction with no optional scan
routines created may be sufficient for the intended operation of the instruction. If
you do not define an optional Scan Mode, the following default behavior of an
Add-On Instruction occurs.
Scan Mode
Result
True
Executes the main logic routine of the Add-On Instruction.
False
Does not execute any logic for the Add-On Instruction and does not write any outputs. Input
parameters are passed values.
Prescan
Executes the main logic routine of the Add-On Instruction in Prescan mode. Any required Input and
Output parameters' values are passed.
Postscan
Executes the main logic routine of the Add-On Instruction in Postscan mode.
For each Scan mode, you can define a routine that is programmed specifically for
that Scan mode and can be configured to execute in that mode.
Scan Mode
Result
True
The main logic routine for the Add-On Instruction executes (not optional).
False
The EnableIn False routine executes normally in place of the main logic when a scan false of the
instruction occurs. Any required (or wired in FBD) Input and Output parameters' values are passed.
Prescan
The Prescan routine executes normally after a prescan execution of the main logic routine. Any
required Input and Output parameters' values are passed.
Postscan
The Postscan routine executes normally after a postscan execution of the main logic routine.
The Scan Modes tab in the Instruction Definition Editor lets you create and
enable execution of the routines for the three Scan modes: Prescan, Postscan, and
EnableInFalse.
Enabling scan modes
50
Rockwell Automation Publication 1756-PM010F-EN-P - October 2014