Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

USB 6211 Digital Out Not Working

Solved!
Go to solution

Ive got a USB-6211 DAQ (and LabView 2009), and Im trying to get the device to ouput (5v) to turn a relay on and off. Im using a tutorial I found online to do the diagram in Labview (http://www.pages.drexel.edu/~pyo22/mem639/lab-usb6211DigitalInputOutput/lab-usbDigitalInputOutput082...) and the circuit is a simple one. I tried running the DAQ Assistant to test if my output was working, and it isnt. Im not sure if my connections to the DAQ are correct or not. Any assistance would be helpful.

 

Thanks.

0 Kudos
Message 1 of 7
(5,743 Views)

Your relay probably needs more current than the digital output can provide. You may need to use a transistor or relay driver chip between the output and the relay.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Message 2 of 7
(5,726 Views)
Solution
Accepted by topic author NT_Mech

Good day NT_Mech,

 

It is indeed possible that you are not driving enough current for the relay.  You can view the specifications of your USB 6211 and see that the digital line will output a maximum of 16mA.  With that said, depending on your relay control current that is needed, you could need to run two outputs in parallel to give you twice as much current supplied.  I recently drove a SSr from a Luminary Micro Prototype board that did not supply enough current as well.  In tat case, I was able  drive the relay by running two lines in parallel.

 

You can always simplify the software side of things by opening Measurement and Automation Explorer (MAX) and right clicking on your device and selecting test panels.  Start»Programs»National Instruments»Measurement & Automation and then expand Devices and Interfaces. Right click and select Test Panels.  You can then configure a digital output for your USB-6211 and toggle it On/Off and check your outputs.

 

Best,

Adam
Academic Product Manager
National Intruments
Message 3 of 7
(5,719 Views)
Well thanks for the replies. I thought it might be the current, but I wasnt sure. I'll give the parallel wiring a try when I get to my lab.
0 Kudos
Message 4 of 7
(5,709 Views)

Ok now the digital out is switching while I am in manual mode in the DAQ assistant, but when I try to operate my program, I get the error:

 

Measurements: Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.

When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.

Number of Channels in Task: 2
Number of Channels in Data: 3

 

Ive got two channels in the DAQ assistant, but what am I missing from the boolean/array control?

Message 5 of 7
(5,703 Views)

Good morning NT_Mech,

 

Based on the error message, it sounds like you might  have 3 channels of data that is being written to only 2 physical channels.  It could help if you posted a screen shot of your VI, along with the error message screen shot to help identify the error cause.  How are you inputting data into your DAQ assistant?  Are you using an array of data?  Are you writing multiple samples per channel, or just one sample per channel?

 

Here is an easy way to configure the DAQ Assistant to write one value out per channel:

-Generate Signals»Digital Output»Line Output»Select 2 Physical Channels (Ctrl+Click)

-Leave the Timing as default, 1 Sample On-Demand

-Click Ok

-Right Click on Data input terminal of DAQ Assistant

-Select Create»Constant

-Expand the constant to display 2 Values, one value per channel

-Select T or F for each corresponding channel

 

This will write the first value to the first channel, and the second value to the second channel whenever this is called in your VI.

 

Best,

Adam
Academic Product Manager
National Intruments
Message 6 of 7
(5,685 Views)
Thanks for the reply, I managed to figure it out yesterday evening. It turned out that I needed two ports in the DAQ Assistant turned on, then I needed to to have two Boolean switches in order to turn my relay on and off. It seems that I have to have 00 or 11 to do the trick, 01 or 10 doesnt turn the relay on and off. I wonder how I can consolidate those two switches into one, or make it so that the switches go on and off at the same time...I'll probably figure that out on my own time. Thanks for the help. :smileyhappy:
0 Kudos
Message 7 of 7
(5,670 Views)