LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Find the source cluster of the element (in cluster)

I'm not sure if I can state this clearly, but will try my best. 

 

Assume I have some clusters (in same type def.) containing several elements. In this scenario, I create an event case and set a event that can be triggered when one of the boolean from the cluster is pressed. Is there any way to know which cluster is the pressed boolean belongs to? Please refer to the picture for a sample.

IanHung_0-1686123188232.png

 

0 Kudos
Message 1 of 4
(748 Views)

You can use 'CtrlRef' on the left and connect it to a property node returning the control label.

Or use two event cases one for each control.

Message 2 of 4
(738 Views)

I strongly recommend the suggestion to have two Event cases, one for Cluster (and put the Cluster control in this case) and one for Cluster2 (and put the Cluster 2 control in this second case).  This is especially important with Latched Booleans, which take their Default value when read.  Putting the two Controls in the same Event case can lead to some hard-to-find Race conditions (unlikely, but why take a chance?).

 

Bob Schor

0 Kudos
Message 3 of 4
(633 Views)

If you use the Event "CLUSTER - ALL EMENTS" instead of Cluster.Boolean

 

LVNinja_0-1686318803608.png

 

Then the Property Laber.Text from the CtrlRef will return the Cluster Label, and you will know witch cluster the boolean came from . 

LVNinja_1-1686318876898.png

 

 

0 Kudos
Message 4 of 4
(624 Views)