Configure NI Device to Be Open-Drain (Open Collector) or Push-Pull (Active Drive)

Updated Nov 6, 2018

Reported In


  • USB-6000
  • USB-6501


  • NI-DAQmx

Issue Details

What is open-drain and push-pull? Also, how do I configure the digital output lines of my NI device to be Open-Drain (open collector) or Push-Pull (active drive)?


First, you should check your device's user manual to ensure that your device supports both push-pull (also called active driver or sourcing) and open-drain (also called open collector or sinking).  The user manual should also contain what the default state for your device is.

Note:  Not all NI-DAQ Devices can be configured as sinking or sourcing.  Most devices listed as bidirectional sinking/sourcing digital devices must be wired in a particular way to perform as either sinking or sourcing devices, as discussed in KnowledgeBase article: Configuring the NI 940x Modules for Sinking or Sourcing Digital Outputs. See your device's user manual for more information on correct wiring of digital lines.

Next, let us briefly explain what open-drain means.  Open-drain (MOSFET) or open collector (BJT) are circuits that use a single resistor with a pull-down or pull-up resistor to transition a digital line between a high and a low.  Basically, the circuit has a resistor between the path to ground or the path to 5V.  So when the transistor is off the line will float to the high or low voltage. 

Let's consider the case of using a BJT with a pull-up resistor. During a high, there is 0V to the base of the BJT. This causes an open circuit on the BJT which causes the line to be pulled high by the pull-up to 5V. With a high impedance load, you should see a full 5V across the load (the pull-up is 4.7k Ohm). During a low, there is 5V generated to the base of the BJT. This shorts the circuit to ground and causes all the current flow from the pull-up circuit to flow directly to ground. This gives you the 0V across the load.

The push-pull, also referred to as the active-drive, works quite a bit differently. This circuit uses two transistors to determine between a high and low logic. For this system, there is typically two BJT's with one being an NPN and the other being PNP. Take a look at the below schematic:

As you can see from the schematic in Figure 2, there are two transistors used to drive the output between the 5V or ground. When Vin is low, the bottom BJT will be on and the top BJT will be off which will result in 0V across the load. When Vin is high, the top BJT will be on and the bottom will be off which will result in 5V across the load.

Note: The NI-USB 6008 always has an output drive-type of open-drain and cannot be changed to push-pull.

Using NI-DAQmx to change to Push-Pull Operation

In LabVIEW you can use a channel property node to configure the various channels on a device. After placing the DAQmx channel property node on the block diagram, click on it and select Digital Output»Output Drive Type as shown below in Figure 3.

Right click on the input node of the DO.OutputDriveType property, and go to Create»Constant. The term Open Collector is the DAQmx equivalent to open-drain, and Active Drive is the DAQmx equivalent to push-pull.

In LabVIEW the channel property DO.OutputDriveType will not be visible unless the DAQmx Channel Property node is referenced to a device that support different output drive types. Additionally, you can right click on DAQmx Channel Property and choose Select Filter... and Show All Attributes to see the property even if the required channel reference is not provided.

This functionality will work the same with LabWindows CVI, Microsoft Visual Studio, and any other language that can be programmed with the NI-DAQmx drivers.To locate the required function call search for Output Drive Type in the DAQmx API help.

Using NI-DAQmx Base to change to Push-Pull Operation

If you are using NI-DAQmx Base you can set this property in the NI-DAQmx Base Configuration Utility. There is no way to programmatically set the output drive setting in NI-DAQmx Base. The Configuration utility can be found in the NI-DAQmx Base folder (typically Hard Drive»Applications»National Instruments»NI-DAQmx Base on a Mac, or /usr/local/natinst/nidaqmxbase/bin on Linux). Complete the following steps to change the output drive setting:
  1.  Select Create New Task
  2. Choose Digital I/O as the acquisition task type and give the task a name
  3. After the task is created, select the Voltage Tab.
  4. In the Voltage Tab, there is a DIO Voltage Level option. For open-drain, use the 0-5V option. For push-pull, use the 0-3.3V option.

Additional Information

Changing this so you do not have to set it manually again is related to the Power-On States parameter. Refer to the manual for your device to see if it supports programmable Power-On States.


Not Helpful