Break (BRK)

The BRK instruction interrupts the execution of a routine that was called by a FOR instruction.
When enabled, the BRK instruction exits the routine and returns control to the routine containing the most recently executed FOR instruction, resuming execution following that instruction. If no FOR instruction preceded this BRK instruction in its execution during this scan then BRK does not initiate.
If there are nested FOR instructions, a BRK instruction returns control to the innermost FOR instruction.
Available Languages
Ladder Diagram
Ladder Diagram_Break (BRK)_v1
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
Execution
Ladder Diagram
Condition/State
Action
Prescan
N/A
Rung-condition-in is false
N/A
Rung-condition-in is true
The instruction executes.
Postscan
N/A
Example
When enabled, the BRK instruction stops executing the current routine and returns to the instruction that follows the calling FOR instruction.
Ladder Diagram
FTStudio-BRK-EX1-V1
This is the routine2:
FTStudio-BRK-LD-EX2-V1
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.