LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Coloring background of front panel indicator manually

Solved!
Go to solution

Hi I am trying to color front panel indicators according to whether a test has passed or not. I have created a SubVI to do the job, but I am having trouble choosing the right property to set depending on what type of indicator is being colored (ie. numeric or string) so I used a case statement, and am trying to detect what type of reference is being passed in so I can set the right property. I have used a number of the existing posts about this to get this far.

 

I seem to be unable to determine the type of reference correctly, I am getting errors about being unable to cast to the specified type, when trying to color a string indicator.

 

I tried to add a screencapture but the system hung, so I have attached the VI, any ideas would be appreciated.

 

Thanks

 

0 Kudos
Message 1 of 4
(2,177 Views)

Hi Triple,

 

use the property "class name" to get the type of the reference. You will receive a string containing "digital" or "string"...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(2,167 Views)
Solution
Accepted by topic author TripleAntigen

When you compare references, the result tells you whether or not they refer to the same object, it doesn't tell you whether they are the same type.

See modified VI for a technique to use.

Message 3 of 4
(2,155 Views)

Great, thanks very much for your time! That works well.

0 Kudos
Message 4 of 4
(2,133 Views)