LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog output using analog input

using USB-6009.
 
how to use analog input and a digital output to activate a external LED ?
0 Kudos
Message 1 of 11
(4,787 Views)
Could you be a might more specific? For example, do you want to use the digital output to drive an LED when the analog input reaches some value?
0 Kudos
Message 2 of 11
(4,779 Views)
just want to drive the LED ? please elobrate little more.
Message 3 of 11
(4,775 Views)
Use one of the analog output lines.  Connect it to a current limiting resistor (start with 1K).  Connect the other end of the resistor to the LED anode.  Ground the LED cathode.  Search Labview for examples on analog outputs.  Basically, you set up the USB device to output a certain voltage on one of the output channels, then you give it the command to start.  If the LED is not bright enough, lower the resistance value.  Be careful not to lower it so much that the current burns up the LED.  Usually 20mA will drive an LED fully.
- tbob

Inventor of the WORM Global
0 Kudos
Message 4 of 11
(4,758 Views)
is there any example ?
 
to create a analog output or digital output. to light up a external LED ?
0 Kudos
Message 5 of 11
(4,736 Views)

Ace66,

You've been asking the same question for about the last month and a half. You've been pointed to LabVIEW and DAQmx tutorials as well as the large number of examples that ship with LabVIEW. Have you tried to run anything or written any code? Have you tried to use the DAQ Assistant? Lets walk through a simple analog output with the DAQ Assistant.

On an empty block diagram, right click to get the Functions Palette and go to Measurement I/O>DAQmx>DAQ Assistant. When the Create New Express Task window pops up, select Analog Output>Voltage. Next, select the physical channel you want to use for the output. Click the Finish button. In the DAQ Assistant window, select 1 Sample (On Demand) on the bottom of the window. Click OK. You will see a Building VI window. When this is done, you will have a DAQ Assistant on the block diagram with an input called Data. Right click on this and select Create Control. You are all done. You have a front panel control that you can enter a voltage and when you run the VI, the DAQ Assistant will output that voltage. At any time, you can change that front panel control to a constant or wire it to something else in your program.

Message 6 of 11
(4,725 Views)
Hi,

What output device do you have? The Compact Fieldpoint output modules can't drive an LED without an external power supply and even with one they can only put out 10ma max which is low at best for an LED.

Albert
0 Kudos
Message 7 of 11
(4,717 Views)
hi ,
 
 
   i am using a USB 6009. i am using a digtal input and analog output. when my digtal input is high , my analog output will light up an external LED. but when my digital low, the LED will OFF
 
question: how to make the LED light up when high input. this high input will last for 5 sec. after change from high to low, the LED will stil light up. but this time we need a digital High to OFF the LED .
0 Kudos
Message 8 of 11
(4,645 Views)
You've been given enough information to start.  This is a simple task.  No one will write your code for you.  Please learn to use Labview first.  All that needs to be done is to create a loop that looks at the digital input.  Use a case structure to do the next part.  If  the digital input is low, in that case, do nothing.  If the input is high, in that case turn the analog output on to drive the LED on.  You can use a shift register to hold the state (on or off), and use this to determine if each digital input high should turn the analog output on or off.  Try writing the code first, post it here.  Then we can help you with any problems.
- tbob

Inventor of the WORM Global
0 Kudos
Message 9 of 11
(4,627 Views)
hey , the attached file is the one i had done.
 
 
the external LED seems not lighting up.
 
there is two case structures. one is to OFF the external LED, the other is use to ON the LED
0 Kudos
Message 10 of 11
(4,611 Views)