LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nugget of the week: Dynamic event registration

Thanks for answering.

 

I don't get your answer though. Maybe I wasn't clear on what I wanted to do - so here is example code:

 

DER example.png

 

My question was how I could find out which control-reference is registered for an event after I have already wired the "register for event"-reference into the event structure.

Since the control-ref registered may change later on it would be helpful in some cases if one could access that data.

 

Best regards

Florian

0 Kudos
Message 71 of 77
(3,258 Views)

Similarly, I've not seen anyone make much, or any use for that matter, of the right hand side node "Event Dynamic Registration" of the event case structure.

 

How is this terminal to be used? Is it a pass through only?

 

0 Kudos
Message 72 of 77
(3,238 Views)

Take a look at the snippet I posted.

I use the right hand node to alter the registered event in the "toggle" value change case

 

Best regards

Florian

0 Kudos
Message 73 of 77
(3,232 Views)

Thanks. That's what I was looking to do with the DAQmx trigger events & wasn't sure if you could assign a completely different channel & new task. Looks like you can, at least with the "Done" event. Some of the other choices may not be so easy.

 

mfg

0 Kudos
Message 74 of 77
(3,208 Views)

Sorry I misunderstood your question.  I don't think the wire contains that information, only the type of the control.  The only time that information is available is when the even fires and you get the control reference.

0 Kudos
Message 75 of 77
(3,171 Views)

thanks 

very well explained.

I am using same user event in multiple event structres, The dynamic event is not detected in all event structures especially when one event stucture is handling visa vis.

i was very much confused , but your explaination of mail box aptly described it.

0 Kudos
Message 76 of 77
(3,088 Views)

Just ran into this issue today!

 

I had a single "Event Reg Refnum" wired to two event structures, one in the main VI, and another an asynchronously opened subVI. As you described, the event is removed from the queue after one of the event structures handles it - making the other event structure non-reactive as a result. It did not achieve the notify/broacast type of effect I was looking for. Thanks for clarifying.

0 Kudos
Message 77 of 77
(2,881 Views)