LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Setting color of Boolean LEDs in an Array

Hi all,

Is there a way to have some LEDs in a Boolean array of LEDs set to one color
and others set to another color in LV5.1? I have played with set color for
quite a while and each time I set the color of 1 LED in the array, all the
other LEDs change also.

TIA,

Andy Massey.
0 Kudos
Message 1 of 9
(6,753 Views)
In article <92949f$6bd5$1@news3.infoave.net>,
5ubtle wrote:
>Hi all,
>
>Is there a way to have some LEDs in a Boolean array of LEDs set to one color
>and others set to another color in LV5.1? I have played with set color for
>quite a while and each time I set the color of 1 LED in the array, all the
>other LEDs change also.

If the array doesn't change size, you can convert it to a cluster and
set the attributes on the cluster members individually. If the array
does change size, but to a managable number of known sizes, then multiple
clusters overlaid can be used, disabled and turned invisible as needed.
0 Kudos
Message 2 of 9
(6,753 Views)
Hi Andy,

At first, sorry for a question instead of suitable advises(-;)
As far as I know, colors of LEDs' or Booleans' array cannot
be differently set. Could you instruct me a way of it ?

5ubtle wrote:

> Hi all,
>
> Is there a way to have some LEDs in a Boolean array of LEDs set to one color
> and others set to another color in LV5.1? I have played with set color for
> quite a while and each time I set the color of 1 LED in the array, all the
> other LEDs change also.
>
> TIA,
>
> Andy Massey.

Thanks in advance,
Tom (Tomoya ITO)
0 Kudos
Message 3 of 9
(6,752 Views)
In article <92949f$6bd5$1@news3.infoave.net>,
"5ubtle" wrote:
> Hi all,
>

Is there a way to have some LEDs in a Boolean array of LEDs set to one color
and others set to another color in LV5.1? I have played with set color for
quite a while and each time I set the color of 1 LED in the array, all the
other LEDs change also. ==========================

By their nature, Booleans can only show two states (or colors). If you want
an LED indicator to show 3 or more states it means you need to reference it
with an integer. This means you probably want to use a pict ring to show
each value of the integer. I have done this for multi-colored LED arrays by
creating a boolean LED with the color and shape of choice, cutting into the
clipboar
d, pasting into MSPAINT, and saving as a .BMP file. Do this for each
different color. In the control editor for the pict ring, first do an EDIT
>>IMPORT PICT FROM FILE for one .BMP into memory, then right click on the
pict ring and IMPORT PICTURE for that numeric state. Repeat for as many
states as you need. Once the pict ring is done, you can drop it into an
array and it looks just like a boolean LED with as many colors as you can
choose.

Be cautious, though. One out of every seven males (myself included) has a
color perception deficiency, and may not always be able to discriminate
between states. When I do these multi-colored LED rings, if possible I have
my bitmap LEDs show a little text (even one letter) to help...

Greg




Sent via Deja.com
http://www.deja.com/
0 Kudos
Message 4 of 9
(6,752 Views)
"5ubtle" wrote in message
news:92949f$6bd5$1@news3.infoave.net...
> Hi all,
>
> Is there a way to have some LEDs in a Boolean array of LEDs set to one
color
> and others set to another color in LV5.1? I have played with set color
for
> quite a while and each time I set the color of 1 LED in the array, all the
> other LEDs change also.

By definition, all elements in an array must be identical. For boolean
indicators, there is exactly one "true" color and exactly one "false" color,
shared by all elements of the array.

A quick workaround would be to use an array of "color boxes" and feed it
with an array of desired colors, programmatically generated based on your
desired patterns.

You can also use a cluster of booleans, but this seems
a little awkward. You
cannot easily resize the it and the colors must be handled by attribute
nodes.

Go with the color boxes!
(I can make you a small example if you like).

HTH
Christian
Message 5 of 9
(6,746 Views)
I'm surprised nobody else suggested this- the approach of having many
invisible clusters of Booleans is especially cludgy!

One person warns of the colour vision deficiency in certain users. One
possible way of solving this- and making the code implementation easier- is
to have somewhere a colour box array control, which you set your preferred
colours in as default. The user can then change these at will to change the
colours in the indicators. To identify which colour value to use in your
indicators, you simply index the control array with an integer representing
your indicator state.

What I'd suggest is you write a sub-VI that takes two inputs- a Boolean
which defaults to false and an integer. When you pass the integer alone, it
returns a colour value tha
t can be fed into your indicator array. When you
pass it a Boolean "True" then it pops open its panel and allows you to
change the colours. If the colours are changed, the new settings are saved
to a file that is read on the first call of the sub-VI. Use an uninitialised
shift register in a single iteration while loop to determine if the vi has
been previously executed and contains valid colour data.

Christian Altenbach wrote in message
news:3a4d0541@newsgroups.ni.com...
>

> A quick workaround would be to use an array of "color boxes" and feed it
> with an array of desired colors, programmatically generated based on your
> desired patterns.
0 Kudos
Message 6 of 9
(6,746 Views)

Years, even decade later, thank you for that response. I had the same problem while tracking a wafer map and for some reason it hadn't occured to me to just make an array of coloured boxes.

 

Cheers,

 

Christian

0 Kudos
Message 7 of 9
(5,474 Views)

@cscansin wrote:

Years, even decade later, thank you for that response. I had the same problem while tracking a wafer map and for some reason it hadn't occured to me to just make an array of coloured boxes.


Also don't forget to vote for this idea. 😄

 

0 Kudos
Message 8 of 9
(5,464 Views)

Haha, awesome. Will do!

0 Kudos
Message 9 of 9
(5,456 Views)