658 Rockwell Automation Publication 1756-RM003N-EN-P - October 2011
Appendix B Function Block Attributes
Order of Execution
The RSLogix 5000 programming software automatically determines the order of
execution for the function blocks in a routine when you do the following:
· Verify a function block routine.
· Verify a project that contains a function block routine.
· Download a project that contains a function block routine.
You define execution order by wiring function blocks together and indicating the
data flow of any feedback wires, if necessary.
If function blocks are not wired together, it does not matter which block executes
first. There is no data flow between the blocks.
If you wire the blocks sequentially, the execution order moves from input to
output. The inputs of a block require data to be available before the controller can
execute that block. For example, block 2 has to execute before block 3 because the
outputs of block 2 feed the inputs of block 3.
Execution order is relative only to the blocks that are wired together. The
following example is fine because the two groups of blocks are not wired together.
The blocks within a specific group execute in the appropriate order in relation to
the blocks in that group.
Resolve a Loop
To create a feedback loop around a block, wire an output pin of the block to an
input pin of the same block. The following example is okay. The loop contains
only a single block, so execution order does not matter.