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,148 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,144 Views)

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

Message 3 of 32
(8,137 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,128 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,117 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,113 Views)
In each case, I unbundle the relevant element(s) and process accordingly.
0 Kudos
Message 7 of 32
(8,107 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,050 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,031 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,993 Views)