From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event registration / event handling weirdness

Solved!
Go to solution

Hi All,

I just came across a weired problem with event registration and handling. 

In my project (this is AF but that is probably not relevant to the issue) I am passing some clusters/arrays of UI control references to a sub-vi for dynamic event registration and handling. I attatched a screenshot of the core part of the sub-vi. 

The "Register for Events" function has quite a number of inputs (~25) but most of the work as expected and the events seem to be handled correctly.

However the last couple of items seem not to register at all, although the references passed to the "Register" function are correct and the events are defined in the event structure. I even tried to hook up a reference from the same VI to see if it would work, but the problem seems to really be somewhere between the "register for Events" and the event structure. 

Up to the green marked event the events are handled OK, the red ones are not handled at all for some unclear reason. It seems to be independent from the event type.

(I am not attaching the VI because it has too many dependencies.)

Has anyone come across a similiar problem yet? Something obvious I might have overlooked?

Thank you.

0 Kudos
Message 1 of 7
(3,162 Views)
Solution
Accepted by topic author mirode

Please verify that the Register For Events node doesn't create an error. I think it behaves the same as a property node as such that an item which creates an error will prevent the node from completion. Order of execution is top->down.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 7
(3,150 Views)
Thanks for this hint, I will have a look and let you know ASAP. Meanwhile, would an error not open a pop up window in this case (error terminal not connected and the ignore errors in the node option not selected?)
0 Kudos
Message 3 of 7
(3,120 Views)
Solution
Accepted by topic author mirode

@mirode wrote:
Meanwhile, would an error not open a pop up window in this case (error terminal not connected and the ignore errors in the node option not selected?)
There are two relevant settings: One is a global setting to enable automatic error handling and the other is a per-VI setting (should be in the debugging/execution page). Disabling any of them will stop AEH from happening and I'm fairly sure the actor core VI has it unchecked, so VIs which override actor core also have it unchecked by default.

 


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(3,094 Views)

What if you temporarily remove the first item that doesn't work, do remaining items work fine?

0 Kudos
Message 5 of 7
(3,056 Views)

Without testing, nobody can tell. Reason: Possibly the following items have errors as well.

Without seeing the code, its hard to tell if at all and why an error might occur in a specific event registration.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 7
(3,010 Views)

 


@Norbert_B wrote:

Please verify that the Register For Events node doesn't create an error. I think it behaves the same as a property node as such that an item which creates an error will prevent the node from completion. Order of execution is top->down.

 

Norbert


 

Norbert_B, this was THE reason... After I'd inspected the error wire I noticed error 1055 from the node, invalid reference. One of the cluster elements was undefined and it broke the execution of the node, from this point onwards.

 

There are 3 interesting things I learned today or at least refreshed in my memory:

 

1. The registration node can execute partially (I was aware of the top to bottom sequence but did not realize the potential partial execution, I'd expect it will not execute at all if an error occurs somewhere.)

2. You can not use an invalid reference to register for events (at some point I wanted to use such references as dummies in case I'd not need the whole functionality of the parent method in some child)

3. The consequences of the AEH settings and their inheritance.

 

Thanks to all.

 

 

 

0 Kudos
Message 7 of 7
(2,995 Views)