LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop button for while loop won't work

Solved!
Go to solution

I am at a loss as to why I can't stop the while loop in this diagram using the "stop" button. I have changed the mechanical action of the button but it seems to make no difference. Thanks in advance for your help.

 

0 Kudos
Message 1 of 15
(6,438 Views)

I have a feeling that you must have duplicated the stop button. The label of the stop button in your block diagram is 'stop 2'. Are you sure you are clicking the right stop button? Otherwise, please post the code.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
0 Kudos
Message 2 of 15
(6,433 Views)
I can't open a pdf on my phone. Just a guess, is the button inside the loop? Is there some other code in the loop that is blocking? A loop will not quit until all code has completed.
=====================
LabVIEW 2012


0 Kudos
Message 3 of 15
(6,428 Views)

@Steve Chandler wrote:
I can't open a pdf on my phone. Just a guess, is the button inside the loop? Is there some other code in the loop that is blocking? A loop will not quit until all code has completed.

Worse,  its in a loop on frame 2 of 2 in a stacked sequence.~~~~Shudder

 

Without seeing the vi (just attach it) we can't even tell if the structure gets to frame 2


"Should be" isn't "Is" -Jay
Message 4 of 15
(6,412 Views)

Thanks guys for the quick response.

 

Sorry about making you shudder. The structure get to frame to and it actually polls the button that I show, but somehow my front panel is not useable. I can see the data on the graph but can't adjust the attributes. I have to you the "Labview" stop button to end the VI. I will try and post the whole vi, when I get the chance. 

0 Kudos
Message 5 of 15
(6,403 Views)
Solution
Accepted by topic author griff32

@griff32 wrote:

Thanks guys for the quick response.

 

Sorry about making you shudder. The structure get to frame to and it actually polls the button that I show, but somehow my front panel is not useable. I can see the data on the graph but can't adjust the attributes. I have to you the "Labview" stop button to end the VI. I will try and post the whole vi, when I get the chance. 


Oh, Magic 8-ball....Does the OP have an event structure in another frame defering FP updates?

 

(It Is Possible)

 


"Should be" isn't "Is" -Jay
Message 6 of 15
(6,397 Views)

Thank you Jeff,

 

That is indeed the case, although I sweat I unchecked all the boxes. Thank you all for your responses.

Message 7 of 15
(6,390 Views)

Glad to help (almost freakishly precognicent isnt it)

 

Trust me- the first time I tried to find a similar bug it wasn't so easy


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 15
(6,375 Views)

At the risk of sounding preachy I will say you should forget about the stacked sequence structure. Pretend it is not even there. The flat version has some uses such as when benchmarking code but the stacked one with sequence locals is completely wrong for any application. Just a word of advice and if your existing program does what it needs to do there is not really any reason to change it. But if you plan on significantly expanding it or if you develop a new program then get the stacked sequence structure out of your mind.

 

Use state machines instead. There are plenty of examples all over the forums. They are just a while loop with a case structure and at least one shift register. I think you understand case structures and while loops so the only other thing you need to know about is the shift register. With these three concepts understood it is easy to create state machines in LabVIEW. They will make your life so much easier.

=====================
LabVIEW 2012


Message 9 of 15
(6,369 Views)

Steve,

 

Thanks for the advice, This program is just something I am playing around with, but I will take your advice and try and re-design it without the Sequence structures. They seem logical to me, but I abviously need to get out of my rut and make my life easier, by learning new ways.

 

 

Again thanks everyone for your help.

0 Kudos
Message 10 of 15
(6,351 Views)