06-23-2010 06:11 PM
Hello ,
I have cluster with 10 LED's, each LED represents a test inside my program, depending on pass or fail I want to change the color of each LED,I am using cluster reference as the input to test sub-vi's.
IS there any method to change the color of induvidual elements?
thanks in advance.
Solved! Go to Solution.
06-23-2010 07:32 PM
06-24-2010 08:03 AM
Hi,
Attached front panel screen shot and the block diagram image code, basically in the 2nd image I am using all the FP clusters ref as input and update dynamically.
I am not getting the colors option, I do get colors in the decoration property but when I write into that I get ref error.
Main intention, when pass LED color should be green and when fail it should be red.
06-24-2010 08:45 AM
The properties available for use with any ref wire are determined by the class of the ref wire itself.
Generic refs only have geneirc properties.
The get athe the properties of the elements within the cluster you will have to tell LV the class is a cluster. Similarly for the elements within the cluster.
Please review this Nugget on using Control references. Don't worry about understanding everytihing I wrote in that Nugget since it was written to be entertaining at all levels. Look for the section where I show
how to cast ref nums as specific types.
Ben
06-24-2010 09:03 AM
@cancancanopen wrote:
Main intention, when pass LED color should be green and when fail it should be red.
OK, you need to be more specific than that, because if you only need two colors, you can just use the boolean value while making e.g. TRUE=green and FALSE=Red.
I assume you want at least a third color: Untested=black. Is this assumption correct?
As I said: You would really make your life much easier if you would use a color LED instead, where the value is the color. Have a look at my idea for some useful link. Now you could reduce the problem to a single 2D array of color LEDs, getting rid of all that current complexity. Most likely, you don't even need a subVI and references at all.
The images you have attached are not that useful to me. Can you attach some actual VIs instead? What is your LabVIEW version?
06-24-2010 10:55 AM
Thanks Ben&AltenBach