08-13-2009 10:39 AM
Solved! Go to Solution.
08-13-2009 10:43 AM
Without actually seeing your VI this is what I think is happening.
You have a while loop within another while loop.
You pressed the stop button for your outter while loop, but this will not stop until the inner operation finishes.
Since the inner operation happens to be a while loop, it will never finish, unless you change the boolean control.
So the VI must be forcefully stopped.
Can you please attach what you have so far so I can see what you are doing?
08-13-2009 10:45 AM
08-13-2009 10:48 AM
Move the 'stop' button inside of the inner while loop.
And just for proper coding practices, dont hide code behind a loop
It makes debugging difficult.
You should also move the 'save' button inside the inner while loop as well.
08-13-2009 10:51 AM
Hi Nick,
I think Cory has diagnosed this corectly but I would like to recomend you watch your code in "execution Highlighting" mode (Turn on the light buld and watch the data flow is slow motion). if you watch closely when values are read, you should see what Cory described.
Ben
08-13-2009 10:53 AM
08-13-2009 10:54 AM
Hi,
i looked at your vi. The problem is: you have - as you wrote - two while loops, one inside another. If you start you program, the code in the first while loop is executed. The second while loop starts after ALL values for this while loop have been read, that means to all tunnels of this while loop (means: your string, the save button and - most important - the "stop button". If you haven't hit your stop button at the beginning of your program, your second (inner) while loop will start with "stop=false"...an update of your stop-value on the front panel will not alter the value in the while loop. So the inner while loop will run forever. Try to put the stop-control-terminal into the second while loop, and put an outgoing tunnel from this terminal to the outer while loops stop terminal. So the value of your control is read every time the inner while loop executes and it can be canceled.
Hope this helps,
Greetings
Christian
08-13-2009 10:57 AM
08-13-2009 10:59 AM - edited 08-13-2009 11:01 AM
If your question is pretty similar, or should be a pretty simple question, go and ask it here. If it is pretty much different, then start a new message thread.
To answer the question that you asked in your subject line, you can show the abort button by going to File/VI Properties >> Windows Appearance >> Customize. In there is a check box that determines whether the abort button is shown for the VI. Once the Abort button is shown, the Stop choice in the Operate Menu can also be selected.
08-13-2009 11:02 AM - edited 08-13-2009 11:02 AM
You might as well ask the question here, because you have posted your VI so we are familiar with what you are talking about.
What is your question?