03-26-2011 06:38 AM
Heyya
I am a very new user in labview and for my project I need to control an LED phidget. Currently I am able to initialize the phidget and set in values to which LED to light up.
What I require is i only want the particular LED to light up for a matter of 10 sec and then switch off. Currently the LED lights up but does not go off and stays on indefinitely and on selecting another LED number the earlier one continues to stay light up. Anyone any ideas for solution to this problem.
03-26-2011 01:19 PM
You need to post your code so people can see what you've done so far.
Ed
03-26-2011 01:48 PM
Try the attached VI and see if that is what you are trying to do.
03-26-2011 04:36 PM
You make a couple of mistakes and use some overly complicated constructs.
03-26-2011 05:29 PM
All valid points. Let's make it easier for him to set the array size too.
03-26-2011 05:48 PM
Let's make the visible LEDs auto-adjust too....
03-26-2011 06:31 PM
djpal wrote:I am a very new user in labview and for my project I need to control an LED phidget.
OK, a phidget is something physical, so apparently you have LED hardware and switches. What kind of DAQ hardware are you using? Are you using digital IOs? How are you setting the value that determines which LED to light? (A bank of switches with one switch for each LED? a rotary selector, etc.)
It would really help if you could show us the code you have so far. Also, what is your LabVIEW version?
I any case, what has been posted here so far are virtual implementations. You should be able to re-use part of the code. All you basically need is to translate the physical input to a number and the boolean array to something that light the LEDs accordingly.
Better code only updates the digital output if the value actually has changed, and not 10x/sec. An event structure might be a better choice for that reason (See attached, LabVIEW 2010).
At the moment, your specifications are full of holes and many scenarios need to be better defined:
03-26-2011 07:23 PM
Are you using one of these gadgets?