LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

stop event structure when using a global variable

Thanks for answer,

I've tried to create an event case in the event structure that runs each event return for a global variable, but it never succeeded. In the end I think I will use the example of Matthew.

Only me a question arises: What is the difference between to use event with a timeout and while loop with wait?
0 Kudos
Message 11 of 14
(636 Views)
Hi vicens,

the event structure will react faster to the stop button, the while loop will wait for 1000ms...
When you process other events you can easily put the button in the timeout event.
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 12 of 14
(630 Views)
Not the way he has it written.  He only looks a the stop button in a Timeout event.  The only difference is that the event loop will look at the stop button at the end of the 1 sec wait, where the while loop will look at the stop button at the start of the 1 sec wait.

He would need to create an event for the stop button value change for the loop to fall out as soon as the button is pressed.
0 Kudos
Message 13 of 14
(624 Views)
You wouldn't use the global variable in that case.  You would create user events which you register in the lower subVIs.  Then the main VI would trigger the subVIs' events.  It is a more complicated way to do what you want to do.
0 Kudos
Message 14 of 14
(618 Views)