Flat Sequence Structure autonomous with limit switches

Hello all,
We are working on a film reel style auto. But we are trying to figure out how to use a limit switch instead of using the wait function to call the next step in the routine. We are still fairly new to labview and would appreciate any help.

Thanks again everyone

Place a While loop in the frame you want to leave when the switch is pressed. Inside the loop, put a 10 ms Wait so you don’t keep things like communication and timed tasks from running. Also inside the loop, read the switch. Wire the value of the switch to the Stop terminal of the While loop.

Now, when the sequence reaches that frame, it will stay there until the switch is activated.

If your switch is active low and reads FALSE when pressed, change the loop’s red Stop terminal to a green Continue terminal.