LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically controlling the number of array control

Hello,

 

I created a numeric control and an array of text ring control on the front panel of VI. I wanted to be able to change the number of text ring controls in the array based on the number in the numeric control. For example, when I input 3 into numeric control, there will be three text ring controls that appear instantaneously in the array. When I change to 1 in numeric control, 2 of the text ring controls will disappear and left with only 1 text ring control. Is it possible to do so in Labview? 

 

I am new to Labview. Please help me.

0 Kudos
Message 1 of 3
(2,977 Views)

You could just resize the arrays:

 

To increase the number of elements use the build array and intialize array functions.

To decrease the number of elements use array subset

 

Try that out and come back with some code, if you have any questions remaining.



Remember Cunningham's Law
0 Kudos
Message 2 of 3
(2,970 Views)

Hi,

 

and when you want to actually see that behaviour on the FP you need to use a property node of your array control to set the number of visible rows/columns…

Best regards,
GerdW


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