LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Enable/Disable Array/cluster elements

Solved!
Go to solution

So I would like to build the following Array clusters in my VI:

array_cluster_2.png

Initially the array is 'Disabled and Greyed Out', ticking/unticking the 'Output Trigger Setup' tick box enables/disables the array.

and this is where I am now stuck....

 

In the clusters, I have the initial condition set as Outer Cluster 'Enabled' and Inner Cluster  'Disabled and Greyed Out'.

 

What I would like to happen is that if 'Trigger1' Tickbox is ticked/unticked, the corresponding inner Cluster is enabled/disabled.

Also I would like that when the array is enabled, 'Trigger1' caption in each of the elements is changed to 'Trigger1', 'Trigger2' and 'Trigger3' respectively.

 

Is there any way of achieving this?

 

The reason that I want to use this kind on arrangement is because it would make building the next steps of this project significantly easier.

0 Kudos
Message 1 of 3
(3,764 Views)
Solution
Accepted by topic author sherzaad

Hi sherzaad,

 

Also I would like that when the array is enabled, 'Trigger1' caption in each of the elements is changed to 'Trigger1', 'Trigger2' and 'Trigger3' respectively.

In an array all elements share the same properties: this includes the caption!

So "No", you cannot use different captions for the same item in each array element…

 

I prefer to decouple the UI representation from the data storage datatype. This way you can do anything you like in the UI, but keep your data in a consitent data structure!

Example: I never (or: very very seldom) use arrays in the UI. Most often I only show one array element and have an additional listbox to select the array element I want to edit…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(3,758 Views)

What you _can_ do is adding a string indicator (name?) and hide the Trigger label. That is a data field which is unique to each cluster, thus giving them unique 'names'.

Ofc, since the properties are common, if you enable the inner cluster, it'll enable for all elements. 

You could use Array to Cluster to convert the array to a cluster of clusters with an inner cluster … that way you could control each individually (since they'd all be unique within one cluster), but you'll use the expandability of an array.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 3
(3,739 Views)