LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to display updated values in an array of clusters?

Hi all!

I am designing and coding a LabView application. In one of the modal dialog boxes of the application, I have to dynamically create an array of a cluster in the front panel. The array of the cluster is one dimensional. The number of rows of the array control containing the clusters is dynamic, depending on the user input. I have selected number of rows of the array as 4 in the test vi. The number of columns is fixed to 1.

The cluster comprises of two elements - a numeric indicator labeled "Machine #" and a radio button control with three choices. The three choices are "Pump", "Compressor", and "Fan". I am assigning a machine number to the numeric indicator in the cluster during initialization of the screen. Similarly, I am assigning a default selection - "Compressor", among the three choices of the radio buttons of the cluster. This is done for each element of the array.

As far as I can figure out, I am assigning these values correctly. However, I am unable to see the changes on the front panel in the values of the elements within the cluster during the run time. What am I doing wrong? How can I solve this problem?

I am uploading the test vi that I have written till now. Any help is much appreciated. Thanks a lot in advance.

Sincerely,
Aninda
0 Kudos
Message 1 of 6
(2,830 Views)
Hi!

Maybe, I forgot to attach the VI in my previous posting. Here it is.

Sincerely,
Aninda
0 Kudos
Message 2 of 6
(2,820 Views)
Hi Aninda,
you are displaying elements from index 4 to 7. This part of the array is empty. Right click on the array, then make Index Display visible to reset the element offset.
Alternatively, reset the Index Values property by code.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 3 of 6
(2,812 Views)
Thanks, pincpanter. How stupid of me? I can't believe I did this.

However, I have one more question from you.

Why am I displaying 4, 5, 6, and 7 elements of the array when the dialog box is invoked?

How can I display elements 0, 1, 2, and 3 without resorting to manipulation using the "Index Display"? I also want to transfer the key focus to the first element of the array of clusters as soon as the dialog box is invoked.

Sincerely,
Aninda
0 Kudos
Message 4 of 6
(2,809 Views)
Pincpanter,

Never mind. I figured it out myself. I did not read your answer completely. Sorry for being in a hurry and bothering you.

Thanks a lot for all the help.

Sincerely,
Aninda
0 Kudos
Message 5 of 6
(2,806 Views)
Once you have set the index display to a given value, you can safely hide it again: this value is retained by LV.
The Index Values property gives you the flexibility to change the offset at runtime if you don't want the user to change it by himself.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 6 of 6
(2,798 Views)