LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array of indicators

Solved!
Go to solution

hi

I have over 40 indicators (temperatures) and I would like to change their labels programmatically. In Visual Basic it was possible to do an array of controls or indicators.. how can I do that in Labview ?

thanks

0 Kudos
Message 1 of 6
(3,192 Views)

You can do that when the VI is in edit mode but not at run time. Instead you can use the caption and change it programatically.

 

Edit: Sorry you cannot access the label of an individual element of an array. Here is a little bit information about the array elements properties

-----

The best solution is the one you find it by yourself
0 Kudos
Message 2 of 6
(3,184 Views)
An array if indicator is standard, just drop a boolean led in an array. If you want text with each you need to use a cluster with a string and a led in an array.
/Y
G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 6
(3,172 Views)

hi

sorry, I didn't get it...

Can I make, say 40 thermometer indicators, in an array and address their properties by index in a For loop ?

(also, I need to put them on two different panels... )

thanks for any help

n

0 Kudos
Message 4 of 6
(3,165 Views)

Hi nitad,

 

40 indicators in an array share the same properties, so you can't put your thermometers in an array.

But you can get the reference to each thermometer indicator and put those references in an array. Then use a FOR loop on those references!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 6
(3,142 Views)
Solution
Accepted by topic author nitad54448

If you need each indicator within the array to have a different label, what you can do is create a cluster that contains a string indicator and your thermometer indicator.  By customizing the string (flat classic string, transparent background and border) and arranging things within the cluster and customizing its appearance, you can make it look like your string is a label to the thermometer.

 

Now when you iterate through the array of clusters, you can write the name to the string and the value to the thermometer.

Message 6 of 6
(3,106 Views)