10-13-2009 02:12 AM
As a beginner in LabVIEW and DAQ, I have a little problem that I have not found any solution yet. I'm trying to use the DAQ Assistant to set a logic high (+ 5V) on the digital output P1.3 on my USB 6211 and thereby light a LED.
In the NI-DAQ assistant I select "Generate signals --> Digital Output --> Line output --> Dev1 port1/line3"
In the digital line output Setup I have tried to "invert line" and in "timing Settings" I have set the generation mode to "1 Sample (on demand)". I then connect a "constant" to the "data" of the DAQ assistant and try the values of 1 and 0 but the LED won't light. I have connected the LED between P1.3 (out) and D GND. I have also tried to switch the LED and so on.
What is wrong? I search the internet and ni.com for some basic information have to use the Digital outport but haven't found any good "getting started" tutorials!
Best regards
/Mattias
10-19-2009 06:16 AM
Hi Mattias
Here is an example for you using DAQmx. You need set which line you want to write from. Other examples can be found in the Example Finder. You can find that in the bottom right corner of the Gettings Started screen or via Find Examples in the Help menu. Digital output examples are located under "hardware input and output" -> DAQmx -> Digital Generation.
Best Regards
David
NISW
PS. This snippet is for LabVIEW 2009, if you have a previous version please let me know and I'll post the VI in that version DS.
10-19-2009 06:33 AM
Hi again
Here's a second snippet with a DAQ Assistant example.
Best Regards
David
10-22-2009 06:25 AM
10-22-2009 06:33 AM
Hi Matte
Here are the VIs in 8.2. Hope they help.
Best Regards
David
09-24-2012 07:32 AM
Hi Davidk,
i used your sample and it works fine. Thanks alot.
But i have problems with resesting the DO to 0V again. Could you help me?
Best Regards
Stefan
09-24-2012 09:48 AM
If you are using one of the posted examples, then I don't see how you would have problems. You just need to do another write when the loop finishes. Post what you have tried.
09-24-2012 10:53 AM
Problem is solved, changed the True to a button, now everything works fine.
Thanks!
04-24-2013 12:10 PM
what modules or tool kits i have to set up to excute this program
04-29-2013 07:11 AM
Hi Ayman,
You would only need LabVIEW and NI-DAQmx driver installed that is compatible with the DAQ device you are using.