05-12-2021 02:16 PM
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.
Solved! Go to Solution.
05-12-2021 02:57 PM
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?
05-12-2021 03:00 PM
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.
05-12-2021 03:02 PM
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.
05-12-2021 03:06 PM
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.
05-12-2021 03:07 PM
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.
05-12-2021 03:08 PM
try using a cluster to combine two registered events, and send this cluster to the dynamic connections on event structure.
05-12-2021 03:13 PM
@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.
05-12-2021 03:30 PM
@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.
05-12-2021 05:32 PM
@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.