LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

4-color led

I want create 4-color led. How I can do that?

I use two ROUND LED. One under other. One Black/Yellow, other Red/Green.
Color coded by 2 bits. Leds PROPERTY NODE is selected by this bits also.
This method work correct.

But when I united 8 leds in cluster, I must manualy create PROPERTY NODE each ROUND LED.
When number of diods will be 1024, I think, that will be a big problem.

Can I create PROPERTY NODE automaticaly? Or I must find another way?

Thanks
Message 1 of 11
(5,060 Views)
Try using a color box instead. It is located in the numeric controls section. Then right click on it and select change to indicator. It is a square object, but can be customized.
Message 2 of 11
(5,051 Views)
Hi,
You don't have to do it that way, you can change the color of the led via the property node. Check annex.
I don't think you can create them programatically, the best way to handle hroups of controls is to create an array of references to the controls in the begin of the program and them you can change properties and values using that array.

Hope this helps,
Paulo
Message 3 of 11
(5,047 Views)
One possible way, that unfortunately lacks some flexibility, is to create a 'pict ring'. An easy way to do an LED is to put a pic ring on your front panel, then create an LED of the correct size (this is one of the lacks of flexibility). Open the LED in the control editor, change to "customize mode" in the editor. You can then color the LED to the various colors you need, copy that image to the clipboard, then on the original pic ring perform an "import picture' or "import picture before/after". You can also do all of this in "Paint" or any other graphic editor, but doing it this way is Operating System independent. The inflexibility is that you have to choose LED size at the time you create the pic ring. Once you have made the pic ring's various states you can then open it in the control editor (closing that LED image first) and then make it into a type def, allowing you to use it in many places, but only have to change it from one. You can make the incr/decr controls not visible, the frame and background transparent, etc. The pic ring frame can be resized (to fit into clusters better, etc.) but the image, unfortunately, remains the original size. Another lack of flexibility is that you can't programmatically change the color choices (if you have black/yellow/green/red you have to actually edit the control to get b/y/grn/blue for instance)

Hope this helps.


P.M.

Message Edited by LV_Pro on 06-29-2005 08:30 AM

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 4 of 11
(5,041 Views)
I would definitely go with Unclebump's solution as being the easiest to implement and the most clean.

___________________
Try to take over the world!
Message 5 of 11
(5,031 Views)
Ok tst, I'm having a brain flat line, haven't had enough coffee out of my "ill gotten cup" (check Breakpoint:Global Community for a clue). How did you edit the shape? I also agree that UncleBump/tst's method is much cleaner!


P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 6 of 11
(5,024 Views)
I copied the LED and Decal images from a boolean LED and used them to replace the square ones. Simple as that.
Since I did it all inside LV, the vector format was kept and the control can be resized (altough it seems the edge almost disappears when enlarging, probably because of the different behaviour for the square edge and the round decal).

___________________
Try to take over the world!
Message 7 of 11
(5,018 Views)
Alright tst, I give up! I'm possibly having one of those "Senior moments" but I'm not sure how you copied the decal and LED images and replaced the color box ones and it is really starting to bug me! I've come back to it a couple of times today, but now, with it sitting there in the back of my mind laughing at me, it is starting to negatively effect my productivity. Not that I need this particular tool at the moment, but you know how it is, you see something interesting and you want it, NOW!! 🙂 Could you please describe what steps you used to copy, "In LabVIEW" those elements, please, please. What platform are you using?


Thanks, in advance,


P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 8 of 11
(4,986 Views)
That's OK, I know the feeling.
1. Make 2 new controls (File>>New>>Control Template) and place a boolean LED in one and a colorbox in the other.
2. Go to Edit mode (the tweezers) in the LED, right click the LED and select Copy to Clipboard.
3. Go to Edit mode in the colorbox, right click the inner square and select Import at Same Size. Repeat until properly lathered.
4. The decal is the same thing, but it's harder to catch.

I did something similar in replacing the images for the Push Button (the boolean button with the LED in it) with square ones for a cool effect here. You can probably do some other cool stuff like that.

And the platform is XP.

___________________
Try to take over the world!
Message 9 of 11
(4,967 Views)
Ah ha! Didn't think to go to "New" and couldn't open two control editors otherwise! Kool! Will definitely use this to make those controls that my associates will go "where is that one on the palette"? I've tried to have that kind of stuff to differentiate my code from "mere mortals", but it is harder with all the stuff that comes with LabVIEW (I had a tabbed folders implementation, was bummed when NI made it a control!)

Thanks again!

P.M.
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Message 10 of 11
(4,957 Views)