02-12-2014 04:04 AM
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
02-12-2014 04:34 AM - edited 02-12-2014 04:34 AM
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.
02-12-2014 04:43 AM
Hello,
You can use "replace array subset" function (see attached VI)...
02-12-2014 04:47 AM
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... ^^
02-12-2014 04:51 AM
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.
It looks indeed like a led matrix, and they have different colours.
I will have to keep on searching.
02-12-2014 04:54 AM
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 !
02-12-2014 04:57 AM - edited 02-12-2014 04:57 AM
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!
02-12-2014 05:06 AM
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.
02-12-2014 05:14 AM
Here is the post GerdW is talking about (I guess) :
02-12-2014 05:34 AM
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…