05-20-2017 06:31 AM
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!
Solved! Go to Solution.
05-20-2017 07:37 AM
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.
Ben64
05-20-2017 07:53 AM
I did not know this trick! Perfect,
Thanks! 🙂