From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-24-2020 03:41 AM
Hi,
I have an indicator that shows the pressure limits of my system. These represent 3 channels each attached to a pressure transducer:
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?
09-24-2020 03:52 AM
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.
09-24-2020 04:19 AM
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.
09-24-2020 04:30 AM
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…
09-24-2020 04:47 AM
Yes, true!
so in my code I tried this:
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?
09-24-2020 05:08 AM
@erabrannan wrote:
Yes, true!
so in my code I tried this:
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.
09-24-2020 06:39 AM
Hi,
how do you wire the colour box to the condition of greater than?
-Emilie
09-24-2020 06:51 AM
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.
09-24-2020 06:57 AM - edited 09-24-2020 06:57 AM
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!
09-24-2020 08:08 AM
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.