LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

why do stop buttons sometimes not work

I know there are a lot of threads on this topic and I have tried a lot of the solutions I have seen but I cannot seem to get my program to stop. I have multiple while loops and I want one button that ends terminates the program. I have the tried putting everything in one while loop with a boolean control, I have tried the case structure stop/vi's and I have tried using the stop function (supposed to act the same as the abort button), and still my program will not terminate.

0 Kudos
Message 1 of 10
(5,902 Views)

Try a Local Variable so every loop stop button is activated from the same stop button, if you want all the loops to run independently.

0 Kudos
Message 2 of 10
(5,900 Views)

Outernet,

You might want to check out this document.

Stopping Parallel While Loops in LabVIEW with one stop button

 

Best Regards.

Mondoni
0 Kudos
Message 3 of 10
(5,894 Views)

I'm still have the same problem. Even the stop function which should act like the abort button doesn't work. I manage to stop one loop but my other loops are still running and my program won't terminate. Can someone explain reasons for the program not terminating so maybe I can understand why the buttons don't work?

0 Kudos
Message 4 of 10
(5,872 Views)

Without seeing the program we can only guess.

 

Ben64

0 Kudos
Message 5 of 10
(5,869 Views)

I think that this is a parallelism problem. Have you read what I sent?

If you have only one stop button that controls all your loops, a local variable to all of them should work properly. 

What I mean is: When you have several while loops working at the same time and want to stop all of them with the same Stop Button, you should try to follow the instructions that I sent to you.

 

If you're doing this and you still have the same problem, please post your VI so we can try to locate the problem.

 

Regards.

Mondoni
0 Kudos
Message 6 of 10
(5,864 Views)

My guess is that your stop button has a latching mechanical action, and you've got the terminal in one of the loops.

When that loop reads the button, it reverts to its OFF state; so any subsequent reads of local variables won't catch the bried ON state.

 

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 7 of 10
(5,798 Views)

paul_cardinale escreveu:

My guess [...] 


That's what this topic is all about. Guesses. 

It's impossible to help someone without knowing their problem. You can't give someone a medicine without knowing their disease.

If the problem is still happening, the OP should give more details. Simply say that something isn't working as it's supposed to, doesn't help at all. 

 

Regards

Mondoni
0 Kudos
Message 8 of 10
(5,794 Views)

I managed to get parts of the program to stop with the local variable. It seems that when I press the stop button it stops one loop and then starts the next and when I press the stop button again it stops the program.

0 Kudos
Message 9 of 10
(5,791 Views)

Allow me to make a guess that this link is your friend...  🙂

 

Particularly #2...

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 10 of 10
(5,778 Views)