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: 

how get cluster element value change event

hi,

       i have cluster .i chage any one of the value in cluter element .may i know about which element is changed using common value change event structure.

0 Kudos
Message 1 of 32
(8,123 Views)

Property node >> Control Label

 

Edit: Don't choose <All Elements> for the event source, choose which cluster element you want.

 

Message 2 of 32
(8,119 Views)

You can easily create a seperate event for each cluster element.

Message 3 of 32
(8,112 Views)

@Gregory wrote:

Property node >> Control Label

 

Edit: Don't choose <All Elements> for the event source, choose which cluster element you want.

 


And if you want to get the new value you can cast the control reference to the proper type using a "to More Specific" node as you will see in this old nugget.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 32
(8,103 Views)
What I sometimes do is compare old and new from the event data node using "not equal", convert the resulting boolean cluster to a boolean array (cluster to array) and search for the single true element (search array). The resulting index (typically wired to a case structure) will give you the element position in cluster order.
0 Kudos
Message 5 of 32
(8,092 Views)

@altenbach wrote:
What I sometimes do is compare old and new from the event data node using "not equal", convert the resulting boolean cluster to a boolean array (cluster to array) and search for the single true element (search array). The resulting index (typically wired to a case structure) will give you the element position in cluster order.

I used that same approach on my first CLA exam!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 6 of 32
(8,088 Views)
In each case, I unbundle the relevant element(s) and process accordingly.
0 Kudos
Message 7 of 32
(8,082 Views)

When I have apps that need a lot of controls, I will sometimes nest event structures.  A case in the outer structure to capture all value changes for a cluster, and an inner one to separate value changes for individual cluster elements:

NES.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 8 of 32
(8,025 Views)

Why do you even need the outer event structure?

 

I would strongly advise agains stacking event structures in general.

0 Kudos
Message 9 of 32
(8,006 Views)

You can easily create a seperate event for each cluster element.

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

i know this way. why i asking this mean i have lot of even structure so need to reduce the number of event structure in my program.

Message 10 of 32
(7,968 Views)