Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

How can digital outputs be configured as 'active drive' (rather than the 'open collector' default state)

I'm using a USB-6009 DAQ to activate relays (>3V active) that will, in turn activate a 24V solenoid device.  However, the default state of digital outputs of the DAQ are set to 'open collector', which generates a 5V output seemingly with only ~1 mA  drive.  This is not suffient to trigger the relay & solenoid.  The 5V, 44 mA analog output on the DAQ, by comparison, activates the relays just fine, but there are not enough analog output lines for our needs.

The manual for the USB-6009 states that:

"The USB-6009 ports can also be configured as active drive using the DAQmx API, allowing 3.3 V operation with a source/sink current limit of ± 8.5 mA.  Refer to the NI-DAQmx Help for more information about how to set the DIO configuration."  Configuring the outputs as active drive seems like the ideal solution.  Unfortunately, NI-DAMmx Help doesn't explain how to change the setting..

Labview doesn't have any obvious options, other than conjuring the DAQ assistant, which does not offer this option.  There is a nice example in the NI-DAQmx C reference help, but I'm not programming in C : " int32 __CFUNC DAQmxSetDOOutputDriveType(TaskHandle taskHandle, const char channel[], int32 data);" (unless I'm not understanding this and it can be entered somehow in labview..).

To really complicate things, I'm trying to run the whole process from Matlab, via the data acquisition toolbox, which has several NI- specific settings, but not this one..  I'd be willing to do it in Labview if that is the only option.

many thanks for any assistance..
0 Kudos
Message 1 of 5
(4,732 Views)
I cant assist on the SW end, but for HW I would suggest skipping the relays and instead drive transistors or solenoid drivers directly from the DAQ card. And include a reverse biased diode such as a 1N4004 across the solenoid coils so the electronics do not get zapped when the solenoids are powered down.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 2 of 5
(4,718 Views)
Hi Cordova,

To set the Output Drive Type of a Digital Channel, use the DAQmx Channel Property Node. The property is found under Digital Output>>Output Drive Type.
--
Michael P
National Instruments
Message 3 of 5
(4,710 Views)
Michael  P:

Great- thanks for the info.  Pardon my ignorance, but where exactly do I access the DAQmx Channel Property Node- inside Labview?  Or the in the Measurement and Automation explorer?  Do you think that this setting could then apply when Matlab accesses DAQmx and assigns/controls the digital output lines on the DAQ?
0 Kudos
Message 4 of 5
(4,707 Views)
Hi Cordova,

Yes, that property node is in LabVIEW. To do it in C, you can use the DAQmxSetDOOutputDriveType function. I'm not sure how your development environment accesses DAQmx, but those are two common ways of doing it.
--
Michael P
National Instruments
0 Kudos
Message 5 of 5
(4,702 Views)