11-09-2011 01:10 PM
Hello,
I'm a student working on a project at CU Boulder and I need a little bit of help. I'm kind of new to LabView but, I created a code that will create a random number, which turns on one of four LED's, and then, that LED will turn off after a slide bar (accelerometer) senses a value greater than 5 (this value will change after some accelerometer data). After this process, the random number generator will generate a new number for a new light. I'm just wondering how to tell the computer which LED icon indicates which real-life LED. Is there a way to hook up my LED's without changing my LabView code? Do I need to create a digital output DAQ assistant? Please see the attached labview code and hopefully you can help me out. We've had major problems trying to get our accelerometer to read a constant logical value and have just run into our LED problem.
Thanks, Zack
Solved! Go to Solution.
11-09-2011 01:23 PM
Hi Zack,
your VI is kind of Rube-Goldberg award nominee...
"how to tell the computer which LED icon indicates which real-life LED."
Well, you have to decide where to "hook" those "real-life" LEDs. When you have made your decision you'll need some hardware driver to switch the LEDs. A DAQ assistent may be a good choice when you use NI hardware. Otherwise use the driver coming with your hardware...
"Is there a way to hook up my LED's without changing my LabView code?"
No. "Real-life" LEDs need real hardware drivers...
11-09-2011 02:17 PM - edited 11-09-2011 02:17 PM
If you're going to simplify that VI, might as well remove duplicate code:
11-18-2011 05:29 PM
GerdW
Thank you for your help your code was a lot simplier than mine and has really helped me continue my project by making the necessary adjustments. I ended up using digital channels off a DAQ to control the voltage for the lights.
Zack