04-14-2010 07:07 PM
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.
Solved! Go to Solution.
04-15-2010 10:10 AM
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
04-15-2010 12:12 PM
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,
04-15-2010 02:32 PM
04-15-2010 04:26 PM
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?
04-16-2010 10:59 AM
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,
04-16-2010 06:39 PM