Showing results for 
Search instead for 
Did you mean: 

LED phidget programming help required



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.

0 Kudos
Message 1 of 8

You need to post your code so people can see what you've done so far. 



Edward Motts
Certified LabVIEW Associate Developer
0 Kudos
Message 2 of 8

Try the attached VI and see if that is what you are trying to do.

0 Kudos
Message 3 of 8

You make a couple of mistakes and use some overly complicated constructs.



  • Your reset is one iteration behind, you should compare the current value with the previous and not the previous with the one before that.
  • An equal followed by a Invert is the same as "not equal".
  • Why do you need the second diagram constant of an FALSE array, one is probably enough (branch the wire!).
Here's a quick draft, it is in no way complete. 🙂


0 Kudos
Message 4 of 8

All valid points. Let's make it easier for him to set the array size too.


Timed LED lightingMOD_BD.png

0 Kudos
Message 5 of 8

Let's make the visible LEDs auto-adjust too....


Timed LED lightingMOD_BD.png

0 Kudos
Message 6 of 8


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:


  • What should happen if a second LED is lit while the first one is still on?
  • What should happen if the wait time is changed while a LED is already lit?
  • Can multiple LEDs be ON, each with it's own timeout?
  • ...








0 Kudos
Message 7 of 8
0 Kudos
Message 8 of 8