Function Block Attributes
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 505
In this example, a rung of ladder logic in another routine is used to one-shot latch
a ProgAutoReq to a PIDE instruction when a push button is pushed.
When the TIC101AutoReq push button is pressed, one-shot latch ProgAutoReq
for the PIDE instruction TIC101. TIC101 has been configured with the
ProgValueReset input set. ProgAutoReq get reset because ProgValuieReset is
always set.
Logix-based controllers evaluate function block instructions based on the state of
different conditions:
Condition Description
prescan Prescan for function block routines is the same as for ladder diagram routines. The only
difference is that the EnableIn parameter for each function block instruction is cleared during
prescan.
instruction first scan Instruction first scan refers to the first time an instruction is executed after prescan. The
controller uses instruction first scan to read current inputs and determine the appropriate
state to be in.
instruction first run Instruction first run refers to the first time the instruction executes with a new instance of a
data structure. The controller uses instruction first run to generate coefficients and other data
stores that do not change for a function block after initial download.
Every function block instruction also included EnableIn and EnableOut
parameters:
• Function block instructions execute normally when EnableIn is set.
• When EnableIn is cleared, the function block instruction either executes
prescan logic, postscan logic, or simply skips normal algorithm execution.
• EnableOut mirrors EnableIn. However, if Function Block detects an
overflow condition, EnableOut is also cleared.
• Function Block resumes from where it left off when EnableIn toggles from
cleared to set. However, there are some function block instructions that
specify special functionality (for example, re-initialization) when EnableIn
toggles from cleared to set. For function block instructions with time base
parameters, whenever the timing mode is Oversample, the instruction
always resumes from where it left off when EnableIn toggles from cleared to
set.