09-01-2011 08:26 AM
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.
Solved! Go to Solution.
09-01-2011 08:28 AM
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.
09-01-2011 08:33 AM
09-01-2011 08:52 AM - edited 09-01-2011 08:53 AM
@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
09-01-2011 09:07 AM
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.
09-01-2011 09:15 AM
@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)
09-01-2011 09:26 AM
Thank you Jeff,
That is indeed the case, although I sweat I unchecked all the boxes. Thank you all for your responses.
09-01-2011 09:32 AM
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
09-01-2011 09:43 AM
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.
09-01-2011 11:07 AM
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.