Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 487
For/Break Instructions (FOR, FOR...DO, BRK, EXIT, RET) Chapter 12
Arithmetic Status Flags: Not affected
Fault Conditions:
Execution:
A major fault will occur if Fault Type Fault Code
Main routine contains a RET instruction 4 31
Condition Relay Ladder Action
Prescan The rung-condition-out is set to false.
The controller executes the subroutine once.
If recursive FOR instruction0s exist to the same subroutine, the subroutine is prescanned only the
first time. If multiple FOR instructions exist (non-recursive) to the same subroutine, the subroutine
is prescanned each time.
Rung-condition-in is false The rung-condition-out is set to false.
Postscan The rung-condition-out is set to false.
Index ≥ Terminal Value
No
Yes
Execute Routine
index =(index + step_size)
Rung-condition-in is true.
End
Index = initial_value
Rung-condition-out is set to true.
Step size < 0
No
Yes
Index ≤ Terminal Value
No
Yes
Goto
End
End
Goto
End