LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stopping events

I have a question handling the stop button with multiple event loops.
What I am trying to do is to stop the event loops with an event
caused by the stop button control. With only one event loop this
works fine. But how should I do this, when I have more than one
event loop? I don't want to handle to many cases with one event
loop in order to leave the code more readable. I am looking for
a solution to use the stop event in various event loops,
without using local variables or LV2 globals.
0 Kudos
Message 1 of 3
(2,481 Views)

Hi Tom,

more than one event structure in one vi is not good, but you can insert a control for every event loop. create an event case for this control in the specified loop and connect it to the stop condition. If you stop one loop you can use the "value(signaling)" property of every control to get the event in all loops. I recommend to change the structure of your program to only on event structure.

Mike

0 Kudos
Message 2 of 3
(2,471 Views)

Thanks for you quick reply.

I was trying to post the code. It somehow doese't work.

But you are right. The easiest way is to have only one event case structure in the code. I wanted to avoid having to many stacked

event cases in my code (more than ten). 

0 Kudos
Message 3 of 3
(2,464 Views)