Actor Framework Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Value Change Event and User Event in Dynamic Refnum of Actor Core Event Structure

Solved!
Go to solution

I am trying to create a User Interface actor which will have 100's of front panel controls. I am planning to use the Front Panel Property node to obtain all the controls' references and register a Value Change Event for all of them and use Event Dynamic Registration in the Actor Core. But in the Actor Core Event Structure I already have a User Event and I am not sure how to use both Value Change Event and User Event in the Event Dynamic Registration of the Actor Core. I feel there must be an easy way to do this, but I have not come up with any solution. Any inputs regarding this would be greatly appreciated.  

0 Kudos
Message 1 of 12
(373 Views)

One solution I am considering is using two event structures, one for the Value Change Events and one for the User Events. Will there be any issues if I use two Event Structures if I make sure that there are no events common to the both of them?

0 Kudos
Message 2 of 12
(345 Views)
Solution
Accepted by topic author mka89

Grab the little handle at the bottom of "Register For Events" and pull it down. Then you'll have two inputs. You don't need two nodes.

Message 3 of 12
(336 Views)
Solution
Accepted by topic author mka89

Just expand the register for events node. Click on the bottom and drag down.

Do that to the one your comment is pointing to.

 

Another solution ( I believe this works - haven't tried this in a while, but i remember it working) is to bundle the 2 event registration wires and wire the resulting cluster into the Event Node.

 

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 4 of 12
(334 Views)

Bert beat me to it.

 

but to answer your last question:

 

Can I have 2 event structures on the same VI? Yes you can do that without any problems, provided, they each have their own events registration node if you use one(ie don't ever fork the event registration wire. They can even be registered for the same events an long as they are seperate registration nodes.) The other caveat is neither can be registered for same nondynamic* events.

 

* don't know the official term there, basically any of the builtin events you don't have to register for.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 5 of 12
(332 Views)

That worked! I was creating a second Reg Events inside the sub vi and was trying to add to this Reg Events 😐 . Thank you for the clarification. 

0 Kudos
Message 6 of 12
(327 Views)

try using a cluster to combine two registered events, and send this cluster to the dynamic connections on event structure. 


CQ
0 Kudos
Message 7 of 12
(322 Views)

@Taggart wrote:

The other caveat is neither can be registered for same nondynamic* events.

 

* don't know the official term there, basically any of the builtin events you don't have to register for.


Could you explain this one further? Value change events fire just fine with two user event loops. Even Panel Close fires in both loops. You get some weirdness with filter events though.

0 Kudos
Message 8 of 12
(317 Views)

@CQ_Li wrote:

try using a cluster to combine two registered events, and send this cluster to the dynamic connections on event structure. 


Expanding on this answer a bit:

It does happen that sometimes you must have two Event Registration nodes -- usually when a subVI returns the event registration refnum to caller instead of the raw event refnum (to prevent the caller from triggering the event!). In these cases, you can cluster the two refnums together.

AristosQueue_0-1620851430584.png

 

Message 9 of 12
(305 Views)

@BertMcMahan wrote:

@Taggart wrote:

The other caveat is neither can be registered for same nondynamic* events.

 

* don't know the official term there, basically any of the builtin events you don't have to register for.


Could you explain this one further? Value change events fire just fine with two user event loops. Even Panel Close fires in both loops. You get some weirdness with filter events though.


I thought that caused the same problems as forking the event registration wire, in that you can't guarantee that both event structures see the event.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
Read about my thoughts on Software Development at sasworkshops.com/blog
GCentral
0 Kudos
Message 10 of 12
(275 Views)