LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

led matrix change color

Hello,

 

If I have in the front panel a matrix, where all elements are LED's, Would it be possible to change the colour of a single element in the matrix??

 

First I would have to access to the element 1,2 for example, and then? how do I modify his colour?

 

Thanks

0 Kudos
Message 1 of 10
(3,695 Views)

Hi Edu,

 

when you have an array of boolean indicators (which I think you have, please use specific LabVIEW terms!) then all indicators share the same properties including colors. So the answer to your question is NO.

 

When you want to have an indicator to show different colors for single elements you could use an array of colorboxes or an intensity graph.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 10
(3,687 Views)

Hello,

 

You can use "replace array subset" function (see attached VI)...

 

0 Kudos
Message 3 of 10
(3,680 Views)

PS : I agree with GerdW if the term "colour" used in the question designed the property itself, and if you need to use many colors...But if your LEDs can have only two states, you can simply use true/false values... ^^

0 Kudos
Message 4 of 10
(3,675 Views)

Thanks Julien, your answer is very good, but you set on/off state, and I was looking to change the colour when on.

 

And I was asking about the colour because I have seen this somewhere.

 

LEDArray.png

 

It looks indeed like a led matrix, and they have different colours.

 

I will have to keep on searching.

0 Kudos
Message 5 of 10
(3,666 Views)

OK, so GerdW answer is more suitable.

 

Otherwise you can use a cluster (containing your LEDs) instead of a 2D array, but single element access and manipulation will be more complicated !

0 Kudos
Message 6 of 10
(3,663 Views)

Hi Edu,

 

when you have seen that example FP you should have also seen the explanation given by Altenbach for that FP.

That example was provided to show/explain customization of LabVIEW controls and uses colorboxes as I have suggested in my first post!

 

And PLEASE: use correct LabVIEW words for those items! That's not a "matrix" it's an ARRAY!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(3,659 Views)

Ok ok, I will have to put some ideas together, because I do not know where this image comes from, I just have the image in my desktop since lot of time ago, but I never read (or I do not remember) the explanation that comes with the image.

 

I will take a look at all these indications, thanks to both of you.

 

And GerdW, do not be mad about the terms used. It is not important, and just to let you know, an array with dimensions >=2 is called MATRIX everywhere.

 

This so-called "2D-array or N-array is just an invention from National Instruments that does not make sense. And you gave me the reason yourself when from the very first moment that I said matrix, you got it.

 

Once again thanks to both of you for your help.

 

I will try to make it work.

0 Kudos
Message 8 of 10
(3,645 Views)
0 Kudos
Message 9 of 10
(3,639 Views)

Hi Edu,

 


from the very first moment that I said matrix, you got it


 

Yes I got that from the context of your question.

 

But: a "matrix" in LabVIEW is something different. There are special functions to apply math to a matrix! And it helps others to follow your text when you use the exact terms that are given in the LabVIEW context help when you move the mouse over functions or wires…

 


an array with dimensions >=2 is called MATRIX everywhere


 

Nope.

When I learned other programming languages they all called such data "array". You may look for references in programming languages like BASIC, PASCAL, C, JAVA: they all call such objects array. No "matrix" anywhere…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 10
(3,626 Views)