How Do I Enable Digital Filtering on My Multifunction DAQ Device?

Updated Oct 24, 2020



  • NI-DAQmx

I have an NI Multifunction DAQ which has the ability to apply a digital filter to my input signals. How do I enable this feature and set the parameters in my program?

You can use the digital filter option available on the input lines to eliminate glitches on input data. To enable this option and to set its parameters, you need to use a set of DAQmx channel properties. 

Note: Digital filtering options may not be available on your NI Multifunction DAQ device. Please consult the manual for your device to see if it supports digital filtering.  

To access these properties in LabVIEW:
  1. Place a DAQmx Channel Property Node on your block diagram, located at Functions » All Functions » NI Measurements » DAQmx - Data Acquisition.
  2. Expand the property node to contain 4 properties
  3. For the first property, select Digital Input » Digital Filter » Enable. Wire a false to this input, which will disable the filter on all of the lines by default (allowing you to enable the filter only on specific lines).
  4. For the second property, select Digital Input » Digital Filter » Minimum Pulse Width. This is where you set the filter pulse width.
  5. For the third property, select Active Channels This will allow you to select specific channels on which you would like to enable the filtering.
  6. Click on the fourth property box and select Digital Input » Digital Filter » Enable. This will enable the filter on the lines that are selected in Active Channels.

To access these properties in a text-based language:
To enable the digital filter: DAQmxSetDIDigFltrEnable(TaskHandle taskHandle, const char channel[], bool32 *data); 
To set the minimum pulse width of the filter: DAQmxSetDIDigFltrMinPulseWidth(TaskHandle taskHandle, const char channel[], float64 data);
If you are using NI-DAQ also known as Traditional DAQ (T-DAQ), see below to access the digital filters:

To access the property node in LabVIEW:
Call DIG_Filter_Config with mode = 0 or 2. If you specify mode = 0, then set interval to 0.0. If you specify mode = 2, then set interval to a value that ranges from 0.001 s to 0.1 s. The interval specifies the timebase for the digital filter in seconds.
To access these properties in a text-based language:
Use the DIO Call the VI once with "Filter enable" as the parameter name. Then set the enable values using boolean in (true = filter on; false = filter off). Now call the DIO again with "Filter interval" as the parameter name, and set the values for this parameter using float in. 
Note: NI-DAQmx replaced Traditional NI-DAQ in 2003. NI strongly recommends using NI-DAQmx for new applications. Product Manuals: Getting Started with NI-DAQmx: Main Page