LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

while loop stop

hi so im having trouble stoping my while loop since i have another while loop and a for loop inside. I need to press stop and then run by other two loop twice till the main while loop stops. Any help would be appreciated.

0 Kudos
Message 1 of 2
(2,063 Views)

Well, these tiny inner "pause" loops should be eliminated, they are very clumsy. Use a state machine architecture instead (and calling a button "GO" but labeling it as "stop button" does not really add clarity. 😄 

 

If you want the STOP button to work while the FOR loop is executing, the button needs to be inside the FOR loop. Wire it to the loop stop condition and the otuer loop stop condition.

 

I would strongy recommend to rewrite the entire things as a simple state machine, eliminating all inner loops.

0 Kudos
Message 2 of 2
(2,036 Views)