LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Color indicator

Solved!
Go to solution

Hello Good Evening,

Is there any color indicator that can display color according to values

like example,

 

if value<10:

     displays "Green Color"

else if 10<value<20:

     displays "Yellow Color"

else value>20:

     displays "Red Color"

 

is there any indicator which can help me with this in labview if there is it would be very helpful

Thankyou

0 Kudos
Message 1 of 6
(2,586 Views)
Solution
Accepted by topic author LarryDante

Hi Larry,

 


@LarryDante wrote:

Is there any color indicator that can display color according to values

like example,

if value<10:

     displays "Green Color"

else if 10<value<20:

     displays "Yellow Color"

else value>20:

     displays "Red Color"


Yes, there is!

Use a ColorBox to display colors. And use color constants to define the colors in your case structure…

Best regards,
GerdW


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

Thanks again sir for your help just the thing i was looking for.

0 Kudos
Message 3 of 6
(2,561 Views)

But there a problem i need to pass 3 arguments in just 1 if else loop how could it be done.

 

0 Kudos
Message 4 of 6
(2,550 Views)
Solution
Accepted by topic author LarryDante

Hi Larry,

 

the case structure also can handle numeric values at its selector input, please read the help for that structure!

(Warning: this works best with integer data, float values might produce unexpected results.)

Additionally a case structure also supports more than just 2 cases: again read the help…

 

Or you use some array functions like in this simple example:

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 6
(2,545 Views)

Thank's sir that array method was much simpler for me to work, thank you.

0 Kudos
Message 6 of 6
(2,532 Views)