06-12-2013 10:04 AM
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.
06-12-2013 10:06 AM
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.
06-12-2013 10:09 AM
Outernet,
You might want to check out this document.
Stopping Parallel While Loops in LabVIEW with one stop button
Best Regards.
06-12-2013 10:47 AM
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?
06-12-2013 10:50 AM
06-12-2013 10:54 AM
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.
06-14-2013 09:08 AM
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.
06-14-2013 09:21 AM
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
06-14-2013 09:27 AM
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.
06-14-2013 10:01 AM - edited 06-14-2013 10:02 AM
Allow me to make a guess that this link is your friend... 🙂
Particularly #2...