LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

3 colors (states) for an indicator (LED?)

hello all,

after going thru the various postings on the forum, i still havent
been able to get this. call me slow!!

depending on an input from a register in the PLC, say 0, 1 or 2, the
LED should indicate 3 diferent colors. successful, unsuccessful or
no-result.

i see that there are options for 2 colors to be set on an LED. and 4
colors using attributes.

if anyone has come across this before or has any suggestions...

thanks,
cheers...

-U
0 Kudos
Message 1 of 22
(7,698 Views)
You can use the property Colors[4] and just change the color of one of the states (no need to change the Boolean state) with a case statement. Here's a very simple example of what I mean. To change the colors I used, just use the color tool (paintbrush).
0 Kudos
Message 2 of 22
(7,698 Views)
hi

find attached an example

hope it helps
Werner
0 Kudos
Message 3 of 22
(7,698 Views)
Another (simpler!) method would be the use of a color box indicator.

See attached example.
Message 4 of 22
(7,698 Views)
> depending on an input from a register in the PLC, say 0, 1 or 2, the
> LED should indicate 3 diferent colors. successful, unsuccessful or
> no-result.
>

The LED is a Boolean, thus only two data states, not three. Your
options are to either update its color via property node instead of
writing True or FALSE to the value, or to copy the images and paste them
into a picture ring. The picture ring supports N images. You will
likely want to make the edges transparent after pasting the images into it.

Greg McKaskle
0 Kudos
Message 5 of 22
(7,699 Views)
Would someone kindly tell me how Dennis got that cluser of two colors out of that array constant...the best I can do is attached.  Thank you!
0 Kudos
Message 6 of 22
(7,460 Views)
I can't view what you did but all you have to do is right click on the property node and select 'Create Constant'. Then right click on each numeric in the cluster and replace with a color box constant. Then you can click the color box to select whatever color you want.
Message 7 of 22
(7,447 Views)
thanks Dennis, that took care of it.  One other thing, I would like to pass this LED indicator's state outside of this subvi into my main VI, however it is not passing.  Is this possible?
0 Kudos
Message 8 of 22
(7,442 Views)
Of course. You just have to wire the control and indicator to the connector pane.
0 Kudos
Message 9 of 22
(7,434 Views)
I did this, but it is not passing the changing condition ouside of the subvi.  The main VI LED that is linked just sits there...does it have anything to do with this post: http://forums.ni.com/ni/board/message?board.id=170&message.id=14196&query.id=203663#M14196 
 
Doug talks about this may not work?
0 Kudos
Message 10 of 22
(7,432 Views)