LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change color of color box depending on measurement values

Hello,
 
I'm designing a measurement system which involves measuring corrosion sensors. This is done with DAQpad 6015. Is it possible to let a color box change color depending on the measurement values e.g. if the value is between 10 and 12 green color and let it vary from green to yellow to red depending on the value?
 
thanks Filip
0 Kudos
Message 1 of 16
(3,628 Views)

Hi

You can do this, using a case-structure. Have a look at the attachment.

Hope this helps.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 16
(3,613 Views)
I had my vi change color when the tilt goes negative, you coud try and change this for multiple colors.  It can get tricky figuring out what values equal the various colors.
0 Kudos
Message 3 of 16
(3,610 Views)
Hi nutmegzzzz
 
In you vi you could also use the colorbox-constant instead of the numeric values. So you know which color is set immediately, and you can leave out the comment.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 4 of 16
(3,606 Views)

If you are looking for discrete colors (Green, Yellow, Red) to coorespond to certain ranges it is very easy using case statements whose cases coorespond to the various value ranges.

 

P.M.

saved in LV 7.1.1 WinXP Pro
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 5 of 16
(3,605 Views)

becktho that is a disturbing icon Smiley Surprised 

I guess you guys "wire" faster, sure a fast response to the question.

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 16
(3,604 Views)
LV_Pro
 
This is exactly what I did - or is your solution so different to mine? Than please post it as LV 7.0 so that I could have a look at it.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 7 of 16
(3,600 Views)
Why do you think it is disturbing?
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 8 of 16
(3,598 Views)
Hi everyone,

Thanks for replying nearly as fast as light. This is exactly what I needed. Wasn't that a big deal if you look at it but you have to know it Smiley Happy Anyhow it works perfect now.
Thank you again.

Filip
0 Kudos
Message 9 of 16
(3,597 Views)

becktho, the icon you've chosen is very dark and disturbing 🙂 particularly from some one who seems bright and friendly (lots of helpful posts in the past). Mine is representative of how I feel some days, older than the dinosaurs.

No, your answer and mine are almost identical (I used a slider control as input), that is what I meant about wiring faster, I was wiring when you "won the race" and posted, so you get the "yellow jersey" for this leg of the trip Smiley Very Happy

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 10 of 16
(3,592 Views)