取消
显示结果 
搜索替代 
您的意思是: 

Color indicator

已解决!
转到解答

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 项奖励
1 条消息(共 6 条)
3,198 次查看
解答
已被主题作者 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
2 条消息(共 6 条)
3,185 次查看

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

0 项奖励
3 条消息(共 6 条)
3,173 次查看

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

 

0 项奖励
4 条消息(共 6 条)
3,162 次查看
解答
已被主题作者 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
5 条消息(共 6 条)
3,157 次查看

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

0 项奖励
6 条消息(共 6 条)
3,144 次查看