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: 

UserEvents whole cluster not present, only elements

Solved!
Go to solution

Hello,

 

Scenario: I have several modules which can access data in a cluster via dynamic User Events, so I register these Event Structures for these. Please see the example snippet below.

Sometimes I need to use the whole cluster as it is, but the Event Structure only gives me the elements of the cluster (timestamp, enum, subclusters). So if I need the whole cluster, I need to use a constant typdef of the cluster plus a "Bundle by name" function to get the whole wire. I find this non practical. Is there any special reason why the Event structure has no "whole data value" output, only elements? Or do I miss/do wrong something?

Thanks!

 

event_fullcluster.png

 

0 Kudos
Message 1 of 3
(2,603 Views)
Solution
Accepted by Blokk

It is related to the definition of the User Event Data Type:

The user event data type is a cluster of elements or an individual element. If you wire a cluster to the user event data type input, LabVIEW uses the type name of the cluster as the name of the user event. The names and data types of the cluster elements define the event data the user event carries.

 

To access your whole cluster, just bundle it before wiring it to the Create User Event vi.

UsrEvent.png

Ben64

 

Message 2 of 3
(2,577 Views)

I did not know this trick! Perfect,

Thanks! 🙂

0 Kudos
Message 3 of 3
(2,570 Views)