LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control that sets Array of Cluster size

Solved!
Go to solution

Hallo,

 

I'd like to have a numeric control for the user that allows him to change the size of a control array (of clusters). Is that even possible?

 

Not control just the displayed as in "Number of Columns", but deactivate the clusters that have N higher than # on the numeric control.

 

Thanks,

0 Kudos
Message 1 of 11
(4,269 Views)

Hi spinelli,

 

sounds like you need a numeric control wired to the length input of the ArraySubset function to limit the number of array elements...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 11
(4,264 Views)

It works for the programm, but the user do not see those deactivated cells as deactivated. I would need something that shows that to the user.

0 Kudos
Message 3 of 11
(4,227 Views)

Hi spinelli,

 

when you limit the array size as described above (and refresh the control with the size-limited array, of course) the user will see the deactivated elements.

 

Btw. I would call such an approach a "bad user interface".

Why not limit the possible user inputs so (s)he can only access allowed array elements?

Why use an array control at all in the UI?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(4,224 Views)

It seems that it will work. But how do I refresh the control array?

 

And I need the array size to be defined by the user. The number of elements represents the number of robots on the line, and the information inside the array are the proprierties of each robot.

0 Kudos
Message 5 of 11
(4,221 Views)
Solution
Accepted by spinelli

Hi,

I'm not sure if the vi of re-initialing array size is what you want?

btw, who can tell me why I cannot upload the *.vi file?

 

Download All
Message 6 of 11
(4,219 Views)

Hi spinelli,

 

- "refresh" means: writing the current data into a local variable of the control.

 

- The user may still define the array size. But: you can make a UI, where he only has access to one array element to change the parameters. The user has to select which element to process - and that selection can easily be monitored to allow only valid elements. See this as an example:

BSZ-Config_1.png

On the left side you see a table that shows all possible elements (here just one). You can select an item to edit it's properties on the right side of the UI...

 

@Will: this is an old problem...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 7 of 11
(4,217 Views)

Will, it worked, thanks a lot. That was exactly want I needed. The only problem left is that when I change the value in "Numeric" it resets all the values in the array to initial. Can I store the data in the array to avoid the problem?

0 Kudos
Message 8 of 11
(4,200 Views)

Gerd, thanks for "refresh" explanation, I didn't know it was possible! But I still don't get it with the image you've sent. Where do you go to this configurations? Can you send me the VI or the problem with uploads is for everyone?

0 Kudos
Message 9 of 11
(4,196 Views)

Hi spinelli,

 

the shown frontpanel is of a VI made for our testbench software. I can't send you the VI for several reasons (copyright, heavy linkage to my user.lib, ...).

It's just an example to show you a way, how to present an array of settings to the user - without showing the underlying array itself...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 11
(4,194 Views)