Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting Started with Digital output and USB 6211

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

0 Kudos
Message 1 of 10
(8,170 Views)

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.

 

Const_dig_gen

 

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.

0 Kudos
Message 2 of 10
(8,137 Views)

Hi again

 

Here's a second snippet with a DAQ Assistant example.

 

DAQ_assist_Dig_out

 

Best Regards

David

Message 3 of 10
(8,135 Views)
Thank you for your response! I am currently using LabVIEW 8.2 but I do not really know what the difference is in 2009 in the setup? This week I'm doing some tests with my equipment but will study the examples that you recommended in the next week! I hope I can come back if I have questions!

Sincerely, Matte
0 Kudos
Message 4 of 10
(8,104 Views)

Hi Matte

 

Here are the VIs in 8.2. Hope they help.

 

Best Regards

 

David

Message 5 of 10
(8,102 Views)

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

0 Kudos
Message 6 of 10
(7,344 Views)

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.

0 Kudos
Message 7 of 10
(7,335 Views)

Problem is solved, changed the True to a button, now everything works fine.

 

Thanks!

0 Kudos
Message 8 of 10
(7,330 Views)

what modules or tool kits i have to set up to excute this program

0 Kudos
Message 9 of 10
(7,162 Views)

Hi Ayman,

 

You would only need LabVIEW and NI-DAQmx driver installed that is compatible with the DAQ device you are using.

Best regards
JM, LabVIEW CLA
0 Kudos
Message 10 of 10
(7,130 Views)