LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure

Hi .... Can someone tell me what is the maximum number of events that can be defined on a case of an "EVENT STRUCTURE".

 

Best Regards!!

Jaime

0 Kudos
Message 1 of 10
(3,204 Views)

If you do a search, this has been asked several times on the board.  The consensus is that there is no limit except to what is manageable when coding.  Be sure to have some sort of naming scheme to make it easy to find an event.

 

I have an app that uses 44 events....runs great.

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 2 of 10
(3,199 Views)

I believe the OP isn't asking how many cases can exist but how many events per case are allowed.

 

The answer is the same- virtually unlimited.  except that you are forced to add them 1 at a time in the edit event case dialog so you will wear out your mouse before you run out of events to add


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 10
(3,182 Views)

Also, once you have many events, the line will not be able to show all events unless you make the event structure very long. Keep it simple.

If you have many events in a single event case, your should try to find a better solution.

 

Can you give a more defined example of what you are actually trying to do?

0 Kudos
Message 4 of 10
(3,175 Views)

Thanks for your answers.
I set the case in the EVENT STRUCTURE and runs smoothly, but I explain what I'm doing.
I need to validate that the value of a numerical control (C1) is always greater than the value of the numerical control (C2), after the user enters a data to any of these controls (this is the reason why I'm using an EVENT STRUCTURE). But must I make the comparison between 24 pairs of numeric controls that can be configured by the user.

I hope you can understand my explanation
Greetings !!

0 Kudos
Message 5 of 10
(3,137 Views)

There are a couple of ways to deal with this.

 

Although inefficient you could cluster all of the X controls that need to be greater then the Y controls together, and cluster all of the Y controls. That way you can set a value change on the entire cluster and either narrow the field down more or simply compare all of the relevant pairs. If the controls are all similar/identical you could even use an array so that you can use a FOR loop to simplify things.

 

Otherwise you are going to need to have 24 different Events in the event structure. Then there are a couple of ways of doing it, you cuold perform a comparison and programmatically check and correct the value each time they are entered, or only on the events of the Y (being checked against) update a property node for the X control adjusting the minimum accepted input into the controls.

 

(I'm fairly certain that Jeff or Alten will have better methods, but those would be my suggestions.)

0 Kudos
Message 6 of 10
(3,125 Views)

As you already got an answer in which total 42 events are there. So this will also work fine. Also the way you write the code is also very important. 

 

I guess operation done on these control pair once entered are same and hence all the operation code write down outside event otherwise code will be bigger and lenghy.  For example if you adding(say) the numbers(any pair is entered) then better you write the addtion code outside event rather than inside. 

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 7 of 10
(3,119 Views)

Jaiminho wrote:

I set the case in the EVENT STRUCTURE and runs smoothly, but I explain what I'm doing.
I need to validate that the value of a numerical control (C1) is always greater than the value of the numerical control (C2), after the user enters a data to any of these controls (this is the reason why I'm using an EVENT STRUCTURE). But must I make the comparison between 24 pairs of numeric controls that can be configured by the user.


Can you attach a small example? I am still sure there is a better solution.

0 Kudos
Message 8 of 10
(3,099 Views)

@ogk.nz wrote:

There are a couple of ways to deal with this.

 

Although inefficient you could cluster all of the X controls that need to be greater then the Y controls together, and cluster all of the Y controls. That way you can set a value change on the entire cluster and either narrow the field down more or simply compare all of the relevant pairs. If the controls are all similar/identical you could even use an array so that you can use a FOR loop to simplify things.

 

Otherwise you are going to need to have 24 different Events in the event structure. Then there are a couple of ways of doing it, you cuold perform a comparison and programmatically check and correct the value each time they are entered, or only on the events of the Y (being checked against) update a property node for the X control adjusting the minimum accepted input into the controls.

 

(I'm fairly certain that Jeff or Alten will have better methods, but those would be my suggestions.)


I like the X Cluster Y clusters  If the paired elements are ordered correctly a compare "Elements" not "Aggrigates" will give you an array of booleans with one true element.  cluster to array indexes nicely and replace the element.  Finsh by array to cluster and update the cluster.

 

Two cases 1 event in each.

 

Data structureing in fun isn't it? 


"Should be" isn't "Is" -Jay
0 Kudos
Message 9 of 10
(3,068 Views)

Maybe you want a for loop to run through the 24 pairs of controls whenever you have a front panel change? That is if the pairs are the same type each and you can chuck them in an array. Otherwise you would need a case for each type pair.

0 Kudos
Message 10 of 10
(3,055 Views)