09-22-2025 09:33 AM - edited 09-22-2025 09:37 AM
Hi,
in my VI I need to show a command like this:
So the aim is: I close the connection of one or more switches and I get the confirmation of their status.
I need to configure in the main front panel a flexible number of controls (like the one in the picture) each one related to its particular channel so that the switch can be crontrolled indipendedntly from the others. Since the number of those controls can be varied based on the test, I’m curious to understand if there is a way to control the front panel. Maybe with an array of cluster can be a good idea? Do anyone has any example?
Thank you for the help,
Best Regards,
Zuc
09-22-2025 09:41 AM
An array of cluster is a good way to have dynamic size, yes. You can use a property node to set how many elements are shown so it matches the real number.
09-22-2025 09:46 AM
Hi Yamaeda,
thank you for the help. I think so too, but i'm concerned on the fact that eac time to the device (an Agilent 34980a) will arrive all the values of all the switch channels to rewrite. But i need to command only the channel related to the particular element of the array.
Is there any combination of for loop and/or event struct to achive that?
Best Regards,
Zuc
09-22-2025 10:13 AM
09-23-2025 04:19 AM
Hi Yamaeda,
thank you for the help, but this solution is applicable also for the Front pannel? I try to be more precise: the 3 boolean in the previous post are the controls for a switch, a contact that can be open or close. The Switch status is controlled by the user who manually change it. With your solution i can't resize the cluster on the front panel to manage all the desired command dinamically. Am i missing something in your answer?
i'm using labview 2019.
Vest Regrads,
Zuc
09-23-2025 04:43 AM
Hi Zuc,
@Zuc_lab2 wrote:
but this solution is applicable also for the Front pannel?
I try to be more precise: the 3 boolean in the previous post are the controls for a switch, a contact that can be open or close. The Switch status is controlled by the user who manually change it.
With your solution i can't resize the cluster on the front panel to manage all the desired command dinamically. Am i missing something in your answer?
09-23-2025 04:56 AM
Hi Gerdw,
yes sorry two boolean as input and one boolean as output, the others I/O are hiden. So my aim is: once i received and parsed a table of data i have to create on the front panel the array (can be 1 or 2D array) of cluster that mange those 3 boolean. So if my data table present 5 rows or 100 rows (each one is a switch control) i need the same ammount of elements in the cluster and in the Output boolean array. Each time the user change the value of the close button of one or more switches the Boolean Led will change accordingly.
I have found hold posts that set create a big array and then uses only the active subset, but i need something more adattable and flexible.
Thank you for the help,
Best Regards,
Zuc
09-23-2025 06:20 AM
Hi Zuc,
@Zuc_lab2 wrote:
my aim is: once i received and parsed a table of data i have to create on the front panel the array (can be 1 or 2D array) of cluster that mange those 3 boolean. So if my data table present 5 rows or 100 rows (each one is a switch control) i need the same ammount of elements in the cluster and in the Output boolean array.
I have found hold posts that set create a big array and then uses only the active subset, but i need something more adattable and flexible.
Use an array of clusters to hold the "user control" elements and an array of booleans to hold all output data.
Arrays are resizable in LabVIEW: how much more "flexibility" do you need?
(I don't understand your problem from reading your description. What exactly is your problem with using arrays?)
09-23-2025 06:41 AM - edited 09-23-2025 07:18 AM
Hi GerdW,
essentially two issues:
1. how can i manage the front pannel to fit a possibile high number of element
2. how i can resize it and show runtime in the front pannel before the user use? Meaning that my array have to remain an input. I can use initialize array but i get an indicator in that way
3. assign a name to each element
4. present the input with the string alredy filled so that OP can't use it
I have found something like this, but i struggle in adapting it to my cluster case:
I'm with Labview 2019
Best Regards,
Zuc
09-23-2025 08:13 AM - edited 09-23-2025 08:14 AM
Hi Zuc,
@Zuc_lab2 wrote:
essentially two issues:
1. how can i manage the front pannel to fit a possibile high number of element
2. how i can resize it and show runtime in the front pannel before the user use? Meaning that my array have to remain an input. I can use initialize array but i get an indicator in that way
3. assign a name to each element
4. present the input with the string alredy filled so that OP can't use it
So there are 4 bullet points for your "two issues"? 😄
To give you another idea to think about:
Depending on the requirements I prefer to use a MultiColumnListbox (MCLB) to show a variable number of items to the user.
The user can select a row in this MCLB and you can show settings for that item in separate controls/indicators. When the user operates those separate controls you just update their values in your data storage and in the MCLB display…