Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 491
For/Break Instructions (FOR, FOR...DO, BRK, EXIT, RET) Chapter 12
Example: The FOR instruction repeatedly executes routine_2 and increments value_2 by 1
each time. When value_2 is > 10 or a BRK instruction is enabled, the FOR
instruction no longer executes routine_2.
The RET instruction returns to the calling FOR instruction. The FOR
instruction either executes the subroutine again and increments the Index value
by the Step size or, if the Index value exceeds the Terminal value, the FOR
instruction is complete and execution moves on to the instruction that follows
the FOR instruction.
Calling Routine Subroutine