03-18-2021 05:15 PM
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.
Please, help me out.
Merci!
03-18-2021 07:16 PM
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.
03-20-2021 04:44 PM
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
03-22-2021 10:41 AM
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.
03-22-2021 10:52 AM
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.
03-22-2021 10:57 AM
What would be the best option?
I am unsure what best option could be.
03-22-2021 12:02 PM - edited 03-22-2021 12:02 PM
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.
03-22-2021 12:20 PM
@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.
03-22-2021 01:47 PM
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.
03-22-2021 04:36 PM
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}