LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Front panel indicators

Hi,

 

I have an indicator that shows the pressure limits of my system. These represent 3 channels each attached to a pressure transducer:

 

 

Untitled.png

 

Is it possible that it changes the colour at a defined value? For example:  for one of the three pressure sensors in my picture, the max. pressure is 440 bar (I didnt change that in the picture). Can the fill be green from 0 - 350 bar, then turn orange from 350 - 400 bar and finally turn red for 400 – 440 bar?

0 Kudos
Message 1 of 10
(490 Views)

Hi erabrannan,

 


@erabrannan wrote:

Is it possible that it changes the colour at a defined value? For example:  for one of the three pressure sensors in my picture, the max. pressure is 440 bar (I didnt change that in the picture). Can the fill be green from 0 - 350 bar, then turn orange from 350 - 400 bar and finally turn red for 400 – 440 bar?


Yes.

Spoiler
That's what properties are good for!
Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 10
(485 Views)

Hi,

how would I do that so it changes it just for one pressure transducer and not all 3?

 

because each transducer has their own limit.

 

 

0 Kudos
Message 3 of 10
(474 Views)

Hi erabrannan,

 

the simple rule applies: in an array all elements share the same properties!

 


@erabrannan wrote:

how would I do that so it changes it just for one pressure transducer and not all 3?


The answer is: don't use an array!

Use 3 scalar elements, or a cluster of 3 elements…

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 10
(469 Views)

Yes, true!

 

so in my code I tried this:

 

Untitled.png

 

what I was thinking here is I will make the fill turn green only if the value is greater than 20. But there seems to be a clash between boolean and the numeric indicator.

 

How would I do that?

 

 

0 Kudos
Message 5 of 10
(458 Views)

@erabrannan wrote:

Yes, true!

 

so in my code I tried this:

 

Untitled.png

what I was thinking here is I will make the fill turn green only if the value is greater than 20. But there seems to be a clash between boolean and the numeric indicator.

 

How would I do that?


You're Close. In this case you can add a Select after the Greater than and wire two colors needed through that. One 'normal' color and one for when it's >20.

You're only thinking of "What should happen when it's >20", but missing the thought of "What should happen when it's <=20". That's what the Select is for.

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 10
(447 Views)

Hi,

 

how do you wire the colour box to the condition of greater than?

 

-Emilie

0 Kudos
Message 7 of 10
(415 Views)

hi,

 

thanks to your help I managed to get it to work with one element. But how would I do this with a 1D array? (picture of the first post)

 

-Emilie.

0 Kudos
Message 8 of 10
(411 Views)

Hi Emilie,

 


@erabrannan wrote:

But how would I do this with a 1D array? (picture of the first post)


Did you read my first answer?

 

I hate to repeat:

In an array all elements share the same properties!

Solution: Don't use an array, use scalar elements or cluster of elements!

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 9 of 10
(407 Views)

As said, you can't have individual color in an Array. You can change to a e.g. a Gauge and have a gradient, though that solution only works if you have the same limits.

So, to change colors of slider inside a Cluster, get the references of the sliders and change them via properties.

Cluster Slider colors.png

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 10
(385 Views)