LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Limit to frames on an event structure

Hi,
 
I am using an event structure to look at user input of buttons, etc.   My user panel will have more than 50 different user buttons.  Is there a limit to how many different frames there can be to an event structure.  I am using this on the TPC-2006 touch panel, and once I deploy my application it does not recognize input to some of the frames of the event structure.
 
Thanks,
Laura
0 Kudos
Message 1 of 15
(5,195 Views)
Hi Laura,
 
There shouldn't be a limit to the number of events you can have.  The only limitation would be the overall size of your application, but that doesn't seem to be the case since it runs fine otherwise.  Are any of the controls overlapping or tabbed?  Which events are unrecognized? 
Jennifer R.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 15
(5,150 Views)
My advice would be to use a naming scheme. You can get all controls from a
front panel property, and register the entire array with a event register
node. Then you wire the event reference to the dynamic event input of the
event structure, and you'll get one event for each control (e.g. value
change).

You can filter the array of controls before you register them. E.g. split
the array in booleans and strings, and register them seperatelly. Then you
get two events, one for all booleans, and one for all strings.

In the event, you get a reference to the control that triggered the event.
So you can read it's label, and decide what to do. Changes are that a lot of
controls do similar stuff. This way, you can reuse most of the code for
similar controls.

Regards,

Wiebe.


0 Kudos
Message 3 of 15
(5,122 Views)
My biggest problem has been with the checkbox controls.  This works well on my PC but does not trigger the event on the touch panel.  I've narrowed it down to this particular event, where as in the beginning I thought it might be the number of events.  But putting the checkbox into an array might solve it.  I will try it out and post the results.
 
Thanks.
0 Kudos
Message 4 of 15
(5,079 Views)


ljray wrote:
My biggest problem has been with the checkbox controls.  This works well on my PC but does not trigger the event on the touch panel.  I've narrowed it down to this particular event, where as in the beginning I thought it might be the number of events.
Since you were able to isolate the problem to a specific control, could you attach a simplified example that demonstrates the problem. What kind of event are you assigning to your checkbox control (mouse down, value change, dynamic, etc.)?
0 Kudos
Message 5 of 15
(5,072 Views)
If you have that many different controls there are undoubtedly some that do similar sorts of things. Say for example you have buttons that when pressed enable/disable channels or inputs or something. Basically they all do the same operation - just on different things. A good way to address this situation is to have all the buttons handled by the same value change event. You can use the ctrlref event data value to determine which button exactly was pressed.

Alternately you can put all the buttons into a cluster and have one value change event for the cluster. In that situation you would find out which button changed by comparing the oldval and newval event data values.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 6 of 15
(5,018 Views)

Hi all

I have doubt in event structure.In my program i have ring control,when i choose options from that the corresponding indicator turns on,works fine.Now i have used event stucutre inside True/False condition in case structure.The purpose i did is if it is false the indicator turns green as per the selection from the ring control. if the case is true as per the selection of ring control the LED turns to different colour.My problem is once i started the program i am only able to select one option from the ring control,after that i am not able to select from it.

 

Thanks

0 Kudos
Message 7 of 15
(4,724 Views)
DON'T put 2 event structures in handling the same event case!  Even if one event structure isn't executing because it is in an inactive frame of the case structure at a given moment, it is still queueing up events for it.  Also, Lock Front Panel until Event Completes being checked complicates everything that much more.
 
You should have a single event structure.  Inside each event case is where you would have a True/False case structure to handle the different pieces of code depending on whether that Boolean control is True or False.
0 Kudos
Message 8 of 15
(4,715 Views)
thanks Raven,can anyone help me with this ,i got struck with this
 
In the prgm when the option is selected it sholud be some colour(now assigned to pink),it needs to be turned on  even if i select other option and until i reset the prgm.
 
now as per my code it changes colour to the selection.any suggestions
 
Thanks
0 Kudos
Message 9 of 15
(4,690 Views)
You need to listen to Ravens advice.
 
Never place event structures inside case structures! It is even worse if each case contains event structures for the same event. This will never work. An event structure is not something that only gets activated by dataflow. Events always get queued up, even if the event structure is not serviced by dataflow (e.g. if it is in the "other" case!). This means that the "hidden" event structure accumulates an infinite amount of events but can never execute them.
 
Use ONE event structure right inside the big while loop and place the cases inside the event structure as needed.
0 Kudos
Message 10 of 15
(4,681 Views)