Loop Interrupt Block

The Loop Interrupt block makes a Loop block end. No more blocks in the loop sequence will execute, and the program will continue with any blocks that are after the loop. You can specify which Loop block to interrupt by using its Loop Name.

You can use the Loop Interrupt block to make a loop exit sooner than it normally would, or in response to a different condition. You can interrupt a loop from inside the loop itself, or from another block sequence that is running at the same time.
Choose the Loop Name


Block Text Field (Loop Name)
Name Selector
Mode
Interrupt
The Loop Interrupt block has a single mode. The Block Text Field at the top of the block displays the Loop Name of the loop to interrupt (see the Loop block). Click the Block Text Field to display the Popup Menu. The Popup Menu will list the names of the Loop blocks in your program. Select the name of the loop that you want to interrupt from the list.

When the Loop Interrupt block executes, the specified loop will end immediately, and the program will skip to any blocks that are after the loop.
Example
This program has a loop named “01” that is configured to repeat 6 times. However, a second running sequence waits for a touch sensor to be pressed, and uses the Loop Interrupt block to stop the loop early if the touch sensor is pressed.
Loop Interrupt
Quick links