LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it better to have one Event Structure with more (10 or 15) cases or several with fewer?

I have several buttons and events on the GUI of my app to monitor. Would it be better to use one Event Structure with several cases (10 or 15) or have a couple and split the cases evenly? None of the cases have much processing to handle, so there is not a time lag issue. I am just worried about overloading the structure. One of the tech support guys mentioned that the event structures are not that hard to get confused.

Has anyone had any problems with Event Structures?
0 Kudos
Message 1 of 4
(2,652 Views)
I use event structures very often in my code. I use them just to handle the interface and to run small code. I have had event structures that handled over 50 user interface events and never had a problem. In my personal opinion If there was any code to run I would let the event structure handle the the user interface event that fired a que in another while loop that handled the code.You can find examples on this, if not I will send you one. It is just good programming practice for beginners because it will alow you to build more robust VI's in the future.

Hope this helps

Joe



Joe.
"NOTHING IS EVER EASY"
Message 2 of 4
(2,652 Views)
Thanks for the info. Do you have a particular example in mind that demonstrates firing a que? I looked at ni.com and did not see one jump out at me.

Tks
Russ
0 Kudos
Message 3 of 4
(2,652 Views)
Just look at the examples within labview itself. You can also open a desugn pattern called producer consumer with events.If you need any more help just let me know.


Joe



Joe.
"NOTHING IS EVER EASY"
Message 4 of 4
(2,652 Views)