If I have two while loops and I want the same button to stop them both, how do I do it? I know I can't put the button in one loop and a local variable to it in the other, I also can't put the button outside both loops. I'm using LabVIEW 7.
Jason wrote: > If I have two while loops and I want the same button to stop them > both, how do I do it? I know I can't put the button in one loop and a > local variable to it in the other.
You say you can't? Why not? Please explain. When you click on the button, the other loop will read the change and then stop the loop. I don't understand your hesitation.
Thank You Michael Aivaliotis http://mmwis.com http://forums.lavausergroup.org http://niweekblog.com
Right click on the Stop boolean control, change the "mechanical action" to "switch when pressed", then you'll be able to use its local variables to stop other loops.
Or you can use occurrence or even notifier (under advanced, synchronization in the function palette) to do it. Examples can be found in the NI Example Finder in LabVIEW.
jakasspinguino@hotmail.com (Jason) wrote in message news:... > If I have two while loops and I want the same button to stop them > both, how do I do it? I know I can't put the button in one loop and a > local variable to it in the other, I also can't put the button outside > both loops. I'm using LabVIEW 7. > > Thanks, > Jason
Use Local Variables for the button you want to use and place them in the loops you want them to affect and tie them to those loops. That would be an easy way to do it.