LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

limitation of even structure add case

Solved!
Go to solution

hi

        may i know about any limination have  even strucure  add event case .bcase i am using more than 50 add event in even strucute.

0 Kudos
Message 1 of 8
(2,985 Views)

Hi Gokul,

 

there are no (practical) limits - except you maybe lose overview and if one event case executes slow it may prevent other event cases to be executed…

 

Often you can handle more than one event (source) per event case: you have a lot of "value change" events and you should try to group them in event cases…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 8
(2,981 Views)

You can also use dynamic registration and register for the value change event of multiple (Controls[].Value Change) - this will give you a single event and inside the event it gives you the control reference which you can use to get the 'label' of the control that was changed.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 3 of 8
(2,970 Views)

sorry i don't understand clearly.how can i reduce multiple add event case in my program.

0 Kudos
Message 4 of 8
(2,957 Views)

and also what are the problem will come use lot of event case.and this is not a right program?

0 Kudos
Message 5 of 8
(2,950 Views)
Solution
Accepted by topic author GokulGKM

I posted on the forums about how to register for the value change on multiple controls here and here.

 

There is no real problem with having lots of event cases, but it takes a long time to create each one so because I am lazy I try to find ways to speed up my LabVIEW programming - if you have lots of event cases that do the same thing then you can save time by having one piece of code handle multiple events.


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 6 of 8
(2,941 Views)

I have almost 50 events in one of my applications and everything runs great.  The one caveat is that I don't put any big code segments inside the event structure, as this will tie up the UI until the event finishes.  The ONLY code that I run there is the sending of messages to my state machine, which handles the actions associated with the events. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 8
(2,886 Views)

jcarmody wrote a neat utility called "Case Select" which lets you work with large case/event structures a little more easily:

 

https://decibel.ni.com/content/docs/DOC-24058

0 Kudos
Message 8 of 8
(2,866 Views)