LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

led interfacing

Solved!
Go to solution

i tried to implement the example program of led interfacing but the led is not glowing as per the conditions given...

the led should glow when 5v supply given and should turn off when the stop button is pressed

kindly help...

0 Kudos
Message 1 of 9
(3,261 Views)
Solution
Accepted by topic author bncoe

Hi bncoe,

 

please show your "example program"…

 

- Where/How did you connect the LED to?

- When you want to switch off the LED on program exit you need to switch off the output before stopping the VI…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(3,253 Views)

we made connections as shown,(The LED is wired in series with a 330Ω resistor   .We will supply power to this circuit using Digital Line 0 of the myDAQ, and ground the circuit to Digital Ground of the myDAQ )

0 Kudos
Message 3 of 9
(3,206 Views)

this program we have implemented...

not getting properly what went wrong..

our labview version is 2012

0 Kudos
Message 4 of 9
(3,160 Views)
The attachment is not the code. You could very easily have made a mistake. Attach the real thing. Also, you marked the question as solved. That is obviously a mistake since you are still asking questions. Go to Options and change that. A lot of people will not bother to look at solved threads.
0 Kudos
Message 5 of 9
(3,139 Views)

There is something very fundamentally wrong with that circuit.  According the the paper, the LED will be drawing ~15mA.  But the specification for the DIO on the myDAQ states that the maximum current it can output is 4mA.  Therefore, the myDAQ will not be able to light that LED with a direct connection.  You need to use a digital buffer chip that can output the current as a go between.  Something like the 74HCT125N should work.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 9
(3,103 Views)

@crossrulz wrote:

There is something very fundamentally wrong with that circuit.  According the the paper, the LED will be drawing ~15mA.  But the specification for the DIO on the myDAQ states that the maximum current it can output is 4mA.  Therefore, the myDAQ will not be able to light that LED with a direct connection.  You need to use a digital buffer chip that can output the current as a go between.  Something like the 74HCT125N should work.


it should be this way

 

DIO-----|<-----/\/\/\/------+5V
LED 330

Then of course you will have to invert your logic in your program because a LOW on the DIO pin will turn the LED on. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 9
(3,077 Views)

@RTSLVU wrote:

it should be this way

 

DIO-----|<-----/\/\/\/------+5V
LED 330

Then of course you will have to invert your logic in your program because a LOW on the DIO pin will turn the LED on. 


The other problem with that setup is what happens when the DAQ is shut off?  The DIO goes low, causing the LED to turn on.  This is likely not desired.  Now getting an open-collector buffer would work well with that setup (True into the buffer causes the buffer line to go low instead of high impedence, therefore turning on the LED).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 9
(3,064 Views)

@crossrulz wrote:

@RTSLVU wrote:

it should be this way

 

DIO-----|<-----/\/\/\/------+5V
LED 330

Then of course you will have to invert your logic in your program because a LOW on the DIO pin will turn the LED on. 


The other problem with that setup is what happens when the DAQ is shut off?  The DIO goes low, causing the LED to turn on.  This is likely not desired.  Now getting an open-collector buffer would work well with that setup (True into the buffer causes the buffer line to go low instead of high impedence, therefore turning on the LED).


But if the DAQ is shut off woulden't the +5V from the DAQ also be off?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 9
(3,026 Views)