LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make the "abort" button show? (I cannot click "stop" in the operations pull-down.)

Solved!
Go to solution
I altered a template; I put a while loop inside another while loop, which causes the "stop" button to not end the running of the VI. I hooked up the "stop" button to both of the while loops' stop icons, but that doesnt terminate the VI, so I need to use the "abort" button, but it is not there. How can I make it appear/ what makes it appear?
0 Kudos
Message 1 of 40
(3,551 Views)

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?

Cory K
0 Kudos
Message 2 of 40
(3,545 Views)
Solution
Accepted by topic author Nick B.

Move the 'stop' button inside of the inner while loop.

And just for proper coding practices, dont hide code behind a loop Smiley Very Happy

It makes debugging difficult.

You should also move the 'save' button inside the inner while loop as well.

Cory K
Message 4 of 40
(3,529 Views)

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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 40
(3,524 Views)
Thank you, as you may have guessed, I am very new at this. (I am a sophmore in high school, going to be a junior.)
0 Kudos
Message 6 of 40
(3,522 Views)

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


THINK G!! 😉
------------------------------------------------------------------------------------------------
Using LabView 2010 and 2011 on Mac and Win
Programming in Microsoft Visual C++ (Win), XCode (Mac)
0 Kudos
Message 7 of 40
(3,520 Views)
I have another question regarding this VI, should I post a new board, or just ask it here?
0 Kudos
Message 8 of 40
(3,513 Views)

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.

 

Message Edited by Ravens Fan on 08-13-2009 12:01 PM
Message 9 of 40
(3,510 Views)

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?

Message Edited by Cory K on 08-13-2009 11:02 AM
Cory K
0 Kudos
Message 10 of 40
(3,505 Views)