LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Tank Color with Conditions

Solved!
Go to solution

Hi, guys!

 

I think I need some help here.

 

 

I'd like my indicator "Tank" at FP to be red (blue default) when the value is lower than certain amount or higher than certain amount so the users can be warned. I don't know how to achieve this. I have tried to use the property node, but I have no idea how to connect the comparation result to it.

 

Thanks for your time and your help!

 

Best,

Rookie

0 Kudos
Message 1 of 7
(1,702 Views)
Solution
Accepted by topic author RawtoLV

Hi Rookie,

 

which property did you try to use?

 

Usually you want to change a color by condition, so you should use Colorbox constants and wire them (by a Select functions or case structure) to a color property of your indicator!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 7
(1,670 Views)

Here is one example

Example_VI_BD.png

EDIT! Hey ! Good advice Gerd!


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 7
(1,665 Views)

@JÞB wrote:

Here is one example

Example_VI_BD.png

EDIT! Hey ! Good advice Gerd!


I have to say Im pretty new to the software and cannot fully understand your program, but it must be helpful!

Here's what I got following Gerd's advice.

 

Thanks to both of you!

0 Kudos
Message 4 of 7
(1,655 Views)

Hi Raw,

 

well, your two comparisons are essentially just an "in range" check - and that's what Jeff was showing you: InRangeAndCoerce is checking a value for "in range" condition.

 

The next point is: you use two case structures to set the color of your tank. Well, why do you need two structures? It should be a TRUE and a FALSE case (in range or not in range). And so Jeff was using the Select function to provide a color for both cases…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 5 of 7
(1,649 Views)

That makes sense! I see. It is much more efficient! I am going to try his.

0 Kudos
Message 6 of 7
(1,643 Views)

@RawtoLV wrote:

That makes sense! I see. It is much more efficient! I am going to try his.


If you press Ctrl+H a floating help window will show up with information about whatever is under your mouse.  sisnce the functions were all on the palattes I did not bother to explain the example the help file does that for me.  Of course you need to know about turning on the help window.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(1,638 Views)