LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

An LED indicator that changes to 3 different colors and fades between each

Solved!
Go to solution

Hey everybody,

 

I'm trying to make an LED indicator that is hooked up to a scale. The scale will always read between 0 and 20lbs. What I need this LED to do is start off blue or green. Around 10lbs it needs to gradually fade to yellow, and at 20 it should do the same thing but to red.

 

I've tried using a color box with a case structure and also a picture wheel, but all I can come up with is hard color changes from one to the other. The fading between colors is what's killing me.

 

Any suggestions are very much appreciated.

_____________________________

0 Kudos
Message 1 of 11
(5,300 Views)
Solution
Accepted by topic author Matub

I guess the boolean (LED) adds a little flair with the specular reflection so here is one way to do it.

 

BooleanColorScale.png

Message 2 of 11
(5,294 Views)

That's absolutely perfect! Thank you so much.

 

Also, today I learned that the VI Snippet also allows event structures to work. That's really impressive. How do they get something that has multiple cases to come through in the PNG file?

_____________________________

0 Kudos
Message 3 of 11
(5,288 Views)

Actually the built-in snippet creator mangles Event structures (and property nodes) so I used my own home-cooked version to create that Snippet.  You should search for and use the Code Capture Tool, it will help a lot.

Message 4 of 11
(5,282 Views)

Have you considered a Color Ramp instead?  Or using the ramp on a Dial, Meter, or Gauge?

0 Kudos
Message 5 of 11
(5,269 Views)

@Darin.K wrote:

I guess the boolean (LED) adds a little flair with the specular reflection so here is one way to do it.


... or you could simply create a colorbox that looks like an LED. See the three links in my idea here.

 

Spectacularly specular! 😄

0 Kudos
Message 6 of 11
(5,257 Views)

@Matub wrote:
How do they get something that has multiple cases to come through in the PNG file?

 

Basically, the PNG format allows adding custom data to the file, which isn't shown when you view the image. LV basically takes the selected code and saves it into the file and then later extracts it. It looks as if NI used the same function used for creating subVIs to do this, which is why property nodes and event structures don't come out nicely, but as Darin pointed out, the Code Capture Tool will let you get snippets which look good (as well as having a few other nice features).


___________________
Try to take over the world!
Message 7 of 11
(5,231 Views)

Hey is it possible to get this VI. ???

0 Kudos
Message 8 of 11
(5,176 Views)

Do you mean the VI for the picture 

_____________________________

0 Kudos
Message 9 of 11
(5,170 Views)

Hey Its awesome..I never knew that its possible by drag and drop in blank VI...

 

Thanks,

Kumar

0 Kudos
Message 10 of 11
(5,141 Views)