05-31-2016 02:14 PM
Hello,
I found this in the LabVIEW help on-line
http://zone.ni.com/reference/en-XX/help/371361J-01/lvhowto/using_events_and_subpanels/
If you configure a VI to handle an event and then configure the VI you load into a subpanel control to handle the same event, the top-level VI containing the subpanel control handles the event.
Does anyone have an example of this?
This may be cool...
Thanks
Dan
05-31-2016 03:06 PM
05-31-2016 03:15 PM
05-31-2016 06:01 PM
06-01-2016 07:59 AM
I have never found this statement to be true. It would be a programming nightmare.
There may be a small subset of events which are handled by the parent VI but the VAST majority work as advertised.
I personally treat this statement as false.
06-01-2016 09:50 AM
Intaris, forgive me, but which statement do you regard as false?
Bob Schor
06-01-2016 11:29 AM - edited 06-01-2016 11:30 AM
@Bob_Schor wrote:Intaris, forgive me, but which statement do you regard as false?
Sorry, I was rather indiscriminate in my statement.
I'm referring to this one:
If you configure a VI to handle an event and then configure the VI you load into a subpanel control to handle the same event, the top-level VI containing the subpanel control handles the event.
I have often been curious about this statement and have never really found data to back it up.
06-03-2016 07:16 AM
ASTDan,
I was curious, so attached is an example in LabVIEW 2012.
The Count 1 and 2 indicators receive User Event data from the respective subvis.
-Click on the Fire Gen Event button to send event to the main and subvis with the Generate User Event node
-Mouse up on the Fire MU Event button to send mouse event to both vis
-Click on the subvi OK button to send Mouse Up to both vis
I'm not sure what the Help message is referring to.
steve
06-03-2016 08:54 AM
My experience has been the same. No issue to have multiple Event structures configured for the same event. What I have been unofficially told from someone at NI is that all the warnings about using multiple Event Structures are due to the possible use of Filter events. If one of the structure is configured to filter events, you might get unpredictable behavior: some structures getting the events, and some don't.