LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Unregistering Dynamic Events

Solved!
Go to solution

Hi Experts!
Can anyone please tell me the right way of unregistering events.
I'm puzzling myself if i need to connect dynamic event terminals or it will just do fine even its not wired up.

 a.PNG

b.PNG

0 Kudos
Message 1 of 8
(3,740 Views)
Solution
Accepted by popul

The first picture is fine - you don't need to wire through the Event Structure.


GCentral
Message 2 of 8
(3,736 Views)

Curiosity question: anyone know *why* the event registration refnum terminal has this special behavior?  I've known it didn't need to be wired through cases where it wasn't accessed or modified, but it has always struck me as a little odd that it has such a unique behavior compared to other types of structure boundary nodes.   Other types (tunnels, shift registers, ...) either require a wired connection or revert to the datatype's default value.

 

I wonder both why the event reg ref was allowed to be an exception and also why the behavior hasn't been extended (at least optionally) to other boundary nodes.  Just curious.

 

 

-Kevin P

 

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 3 of 8
(3,669 Views)

If I were to take a blind guess, I would think that maybe their implementations are drastically different - the Dynamic Event Terminals are a list of events to listen for, infrequently modified, whilst Shift Registers are a single data object being repeatedly acted on over and over?

 

Tunnels have no pair to draw from, unless linked. Linked tunnels would perhaps make sense, but I guess they're closer to a data object than a registration list.

 

Maybe someone who actually knows something can let us in on the secret 🙂


GCentral
0 Kudos
Message 4 of 8
(3,665 Views)

"Why" question are often the hardest to answer unless you were there in the room when the decision was made. If something comes to me I will share my speculations.

 

But as to the original question as written...

 

If anyone stumbles on this thread trying to learn how to unregister a dynamic event then check out this Nugget posted by Ton about dynamic event registration. In that nugget he shared this image.

 

 

to show that re-registering against a constant will effectively prevent that event from firing.

 

Ben

 

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 8
(3,655 Views)

That nugget looks familiar, and yet I'm doubly surprised to see that even in the event case where the event reg ref was being explicitly modified, it was apparently *still* not necessary to wire the ref across to the right side.   Nor is a shift register used on the enclosing loop to carry a right-side-value over to the next iteration.

 

So what purpose does the right-side node serve?   Can it be useful if the enclosing loop carries the potentially changed value to the next iteration via shift register?

 

 

-Kevin P

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 6 of 8
(3,650 Views)

@Kevin_Price wrote:

That nugget looks familiar, and yet I'm doubly surprised to see that even in the event case where the event reg ref was being explicitly modified, it was apparently *still* not necessary to wire the ref across to the right side.   Nor is a shift register used on the enclosing loop to carry a right-side-value over to the next iteration.

 

So what purpose does the right-side node serve?   Can it be useful if the enclosing loop carries the potentially changed value to the next iteration via shift register?

 

 

-Kevin P

 


The event registration wire is odd in that it does not carry info but does associate the registration nodes with the event structure. It acts like a queue right down to case where if you wire a queue ref wire such that it branches to two or more de-queue nodes, only one of the two nodes will receive a given queued item.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 8
(3,645 Views)

Thinking some more...

 

All event structures theoretically have a dynamic event terminal but they default to not be shown.

 

We can expose them and even with nothing connected to them the code is not broken. So again we see that the dynamic event terminal does not expect any data. If it did expect data, then it would violate data flow in there was a sink with no source (I actually saw a bug like that in LV 6i and it was absolutely freaky seeing a wire with no source and runnable code!).

 

It is shaping up in my minds eye that the dynamic event terminal is a graphic gizmo that we can use to manipulate the events handled by the event structure.

 

So no need to wire anything to it unless we want to change the way the event structure operates.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(3,633 Views)