Rockwell Automation Publication 1756-RM003N-EN-P - October 2011 489
For/Break Instructions (FOR, FOR...DO, BRK, EXIT, RET) Chapter 12
Break (BRK)
The BRK instruction interrupts the execution of a routine that was called by a
FOR instruction.
Operands:
Relay Ladder
None
Structured Text
Use the EXIT statement in a loop construct. See Appendix B for information on
structured text constructs.
Description: When enabled, the BRK instruction exits the routine and returns the controller
to the instruction that follows the FOR.
If there are nested FOR instructions, a BRK instruction returns control to the
innermost FOR instruction.
Arithmetic Status Flags: Not affected
Fault Conditions: None
Execution:
Example:
When enabled, the BRK instruction stops executing the current routine and
returns to the instruction that follows the calling FOR instruction.
Condition Relay Ladder Action
Prescan The rung-condition-out is set to false.
Rung-condition-in is false The rung-condition-out is set to false.
Rung-condition-in is true The rung-condition-out is set to true.
Execution returns to the instruction that follows the calling FOR instruction.
Postscan The rung-condition-out is set to false.