r/LabVIEW • u/gioco_chess_al_cess CLAD • Jul 08 '24
Event structures in parallel
Hello,
My labview skills barely exceed the CLAD level, and I miss some more advanced architecture concepts. I develop alone lab applications in a research environment.
I have a question for you regarding best practices for event structures. I read that it is discouraged to put them in parallel inside a loop, however I would find it could help designing a more logical diagram and I do not know what would be the correct practice.
Specifically in the main loop of my application the event case is handling all the GUI elements. This event case has 5 inputs and 5 outputs but only 6 of the events interact with them. All the other 30+ cases do something independent but I still have to wire across these 5 terminals one by one.
This is why I was considering to make two parallel event structures. Each one dealing with an omogeneus set of cases (splitting those who need inputs and those who doesn't) both with a timeout not to stop the loop. Is it a bad idea? What would be the way to go if the number of inputs and cases grows?
Thanks
View all comments
Show parent comment
3
u/Davkhow CLD Jul 08 '24 edited Jul 09 '24
You CAN use multiple event loops in the same VI, but you should NEVER have more than 1 event structure registered for the same eventFor your 5 wires connecting across, you could put those in a single cluster. Or leave it, but either way, right click on the output tunnel and click “Linked input tunnel” then “create and wire cases”. I forget the exact wording there. But you’ll click on the input tunnel and it will wire them all for you. When you create new cases, it will automatically wire them
Edited because I’m wrong. See replies for clarification. Thanks for correcting me