03-17-2010 11:55 AM
I am building a program that has multiple loops running simultaneously. How do I create a master stop button/link the multiple stop buttons to one? Right now I have 14 different stop buttons and would like to control them all with one main stop button, that way I won't have to hard stop the program, and for when we compile the program into a stand alone running program, the user will be able to have a master stop button available? Any help would be appreciated. Are there any available tutorials?
03-17-2010 11:59 AM - edited 03-17-2010 12:01 PM
Creating local variable of the boolean should solve your issue.
03-17-2010 12:02 PM
03-17-2010 12:03 PM
You can use a local variable to do that, but remember, use local only if you have to. For the switch, remember to change the mechanical action to switch until released.
Yik
03-17-2010 12:51 PM
You're better off using a notifier, as Mark suggested. You are guaranteed not to have race conditions. You can stop as many loops as you need to. And, if you name the notifier, you can access it in subVIs too, which can come in very useful.
It looks like this.
This is a more flexible and reliable solution than a local variable. I'd recommend you do it this way.
03-17-2010 02:15 PM
03-22-2010 03:31 PM
03-22-2010 06:19 PM
Start with the LabVIEW help. The folks who wrote the help files do a pretty good job of explaining things. Read the help files for all of the notifier functions, then post back if you have specific questions and I'll do my best to answer them. Also look at the notifier examples that ship with LabVIEW.
d
05-03-2012 01:28 PM
Does using the "Wait on Nofication" function here require similar (or even coupled) timing of the two loops? If one were to use "Get Notifier Status" this would remove this limitation, correct?
Thanks!
05-03-2012 01:31 PM
@DGCH wrote:
Does using the "Wait on Nofication" function here require similar (or even coupled) timing of the two loops? If one were to use "Get Notifier Status" this would remove this limitation, correct?
Not quite sure what you're asking here. The two loops run completely independently. Get Notifier Status returns the most recent message immediately, even if has already been seen. Wait on Notification waits for a message that that particular node has not yet seen. It has nothing to do with the timing.