LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop a while loop ?

The program is running in a while loop and my frontpanel is waiting for a selection.
Pushing two buttons start subvis, but when I try to stop the While loop, it doesn`t work.
The main VI just doesn't stop.
The inner loops seem to continue.
Sorry the other questions and answers didn't help me. I know it's an easy proplem, but would anyone be so kind to help me?
0 Kudos
Message 1 of 16
(4,470 Views)
All time that your 2 buttons "Enter" and "Button1" are false button Stop can't abort loop because you all time is founding in inner while loops. You must add checking of stop button also in inner loops for aborting.
Look changed VI.
0 Kudos
Message 2 of 16
(4,470 Views)
Thanks for your quick answer.
But my labview program LabView 6.1 says "Latch function with a button doesn't fit with a local variable"

I can't run your program.
0 Kudos
Message 3 of 16
(4,470 Views)
Click on your "Stop" button right click, select "mechanical action", select one of up row selections :"Switch until pressed" etc.
0 Kudos
Message 4 of 16
(4,470 Views)
Nope is not working, non of the mechanical actions. Did you tried it by yourself?

I need an answer, how to start a while case inside a other while case.
This must be possible and shouldn't be that difficult.
Stupid me.
0 Kudos
Message 5 of 16
(4,470 Views)
0 Kudos
Message 6 of 16
(4,470 Views)
I press the STOP Button. Sometimes nothing happen, sometimes the two other dialog windows are poping up.
But the main VI doesn't stop.

Did it run on your system and stopped the VI?

Is it because the While loops are closing and the dataflow goes to the sequences and they are runing?
0 Kudos
Message 7 of 16
(4,470 Views)
Change mechanical action of "Stop" to "Switch When Released" instead "Switch Until Released"
0 Kudos
Message 8 of 16
(4,470 Views)
As I said before, all the mechanical actions doesn't work.
With "Switch When Released" the two windows pop up, and afterwards the Main VI is stopped. Not the result I want.
Beside that, the stop button stays dark grey afterwards, why is this?
0 Kudos
Message 9 of 16
(4,470 Views)
OK. Please send me all vi's that you are using in main.vi I haven't 3 sub-vi's for checking all.
0 Kudos
Message 10 of 16
(4,470 Views)