LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event handler

HOW DO I GENERATE AN EVENT HANDLER FOR THE FOLLOWING VI, THAT IS ONLY TO RUN THE TRUE/FALSE STATEMENT ONLY ONCE AND WILL RUN AGAIN WHEN THE STATE CHANGES.
ATTACHED IS MY VI, MIGHT RUN INTO PROBLEMS LOADING IT BUT IT WONT IMPACT THE RESPONSE.

THANKS!!!!

-FREDFRED
0 Kudos
Message 1 of 3
(2,367 Views)
Instead of polling, use the event structure. Create an event structure. Add an event on the Channel Select Value Change. Inside the event case, add the Channel Select control and the vi that it is wired to. It will execute only once, every time the Channel Select value is changed.
- tbob

Inventor of the WORM Global
Message 2 of 3
(2,351 Views)
You don't say which true/false case should only execute when the event occurs. The big one or the small one???
How often should the loop run if the event occurs? How often should channelselect run?
The code in its present form does not look very intuitive. It is difficult to tell what it does.

Here's one possibility of the big case should only happen whenever the value has changed. The exact implementation will depend quite a bit on how the rest of the code works.
Message 3 of 3
(2,346 Views)