LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Array and Cluster

Hello,

 

I am having trouble enabling the this array of clusters.

When clicking the enable button I want the other Strings to be enabled one by one and ask for something. For example an user input. 

 

I tried this but I didn't get anywhere. I am sorta new to some of this stuff. 

 

 

john1223_0-1616105416281.png

 

Please, help me out. 

 

Merci!

0 Kudos
Message 1 of 10
(2,951 Views)

If you want help, you should post an actual VI with whatever code you have created to date.

 

A picture of a front panel doesn't let anyone help you.

 

Note.  All elements in an array must have the same properties.  That means you can't enable a control in element one and have the same control in element 2 be disabled.

0 Kudos
Message 2 of 10
(2,909 Views)

Clusters allow you to group different (or the same) things into an "entity" (like a Struct in C or a Record in Pascal), giving each a name that identifies it.  

 

Arrays are collections of identical things that are accessed strictly by their "index", a measure of how far they are from being the initial item in the Array.

 

If you have an Array of Numbers, you can choose to have all of the numbers be displayed as Hex, or in a number of Floating Point formats, but they will all be displayed the same way.  If you have a Cluster of, say, 5 Dbls, you can display the first in one format, the second in another, and can choose to make the third "invisible".

 

Bob Schor

0 Kudos
Message 3 of 10
(2,860 Views)

This is what I am trying.

This doesn't look to be possible, what could be better?

 

I am just trying to enable a row if the button is on and sorta ask for user input. 

 

0 Kudos
Message 4 of 10
(2,783 Views)

As I said before, you cannot.

 

What you are asking for is to have some elements of the array have different properties.  Rows 0, 1, 3 be enabled for example, and rows 2, 4, .... be disabled.  Elements of the array cannot have different properties.

 

 

0 Kudos
Message 5 of 10
(2,777 Views)

What would be the best option? 

I am unsure what best option could be. 

0 Kudos
Message 6 of 10
(2,771 Views)

How many rows could you potentially have?

 

Is it a fixed number?

 

You can have a cluster of clusters.  So you can iterate through the higher level of clusters and disable them if the boolean within that cluster is false.

 

But you have to determine at edit time how many clusters you need.

0 Kudos
Message 7 of 10
(2,755 Views)

@john1223 wrote:

What would be the best option? 

I am unsure what best option could be. 


I'm still wondering if Prompt User Express vis would be better.


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 10
(2,747 Views)

It's a fixed size cluster. 

 

Cluster [ String, String, Boolean] 

Cluster [ String, String, Boolean] 

Cluster [ String, String, Boolean] 

 

This is a fixed size cluster like the above. User should input something to strings rows. 

 

Thanks. 

0 Kudos
Message 9 of 10
(2,737 Views)

No.  You currently have an array of clusters

 

Array of N elements  (N could vary at run time)

   Array Element 0  Cluster of {String, String, Boolean}

   Array Element 1  Cluster of {String, String, Boolean}

   Array Element 2  Cluster of {String, String, Boolean}

   .......

 

 

You need to have a Cluster of clusters

 

Cluster  of X elements  (X must be fixed at edit time)

   Cluster Element 0  Cluster of {String, String, Boolean}

   Cluster Element 1  Cluster of {String, String, Boolean}

   Cluster Element 2  Cluster of {String, String, Boolean}

0 Kudos
Message 10 of 10
(2,723 Views)