LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stopping multiple loops

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
0 Kudos
Message 1 of 4
(3,480 Views)
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


Michael Aivaliotis
VI Shots LLC
0 Kudos
Message 2 of 4
(3,479 Views)
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.

Dan
0 Kudos
Message 3 of 4
(3,479 Views)
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.

Billie Kennedy
0 Kudos
Message 4 of 4
(3,479 Views)