このコンテンツは設定された言語で表示できません。

このコンテンツは表示可能な別の言語で表示されています。 お使いのブラウザに翻訳機能がある場合はご利用ください。

Enabling the Digital Debounce Filters for NI 66xx Devices with NI-DAQmx

Updated Apr 25, 2023

Reported In

Hardware

  • PCI-6602
  • PXI-6602
  • PCI-6601
  • PXI-6624
  • PCI-6624
  • PXI-6608

Software

  • LabVIEW Full
  • LabVIEW Base
  • LabVIEW Professional

Driver

  • NI-DAQmx

Programming Language

  • C

Issue Details

How do I enable the digital filters for the NI 66xx or M-Series devices in NI-DAQmx?

Solution

Use the following methods to enable the digital filters:

Using LabVIEW:
A DAQmx Channel Property Node must be used to enable the digital filter and set its value for the Counter Input task, as shown below. If you are using the programmable setting, you must use the DAQmx Channel Property Node to set the source and rate for the filter clock. To use the digital filter enable property for a counter input, select Counter Input » Frequency » Digital Filter » Enable. To set the filter rate, select Counter Input » Frequency » Digital Filter » Minimum Pulse Width. For a counter output use a similar path. In the VI snippet shown below, the measurement type is frequency.  




Using ANSI C:
The NI-DAQmx C API has properties which can be set to enable the digital filters depending on the type of Counter Input task. For example, to enable the digital filter for a Counter Input Frequency task, you would use DAQmxSetCIFreqDigFltrEnable to enable the filter and DAQmxSetCIFreqDigFltrMinPulseWidth to set its minimum pulse width. To use a programmable filter setting with the same type of task, you must use DAQmxSetCIFreqDigFltrTimebaseSrc to set the source of the filter clock and DAQmxSetCIFreqDigFltrTimebaseRate to specify its rate.


Note: 
  • When enabling the digital filter, you must choose a supported value for the filter. Supported values include 100 ns, 500 ns, 1 µs, 5 µs, and a programmable setting based on an external filter clock. Different counter inputs cannot have different custom filter values. 
  • If you are using the programmable setting, you must set the source and rate for the filter clock. M-Series devices support filter values of 125 ns, 6.425 us, and 2.56 ms. See the product manuals linked below for more information.

Additional Information

  • NI TIO devices have digital debounce filters that can be enabled on the Programmable Function Input (PFI) lines. You can find additional information about the filter settings for each device in the device's user manual in the Digital Filtering section. Information is also available in the NI-DAQmx Help file in the section "Digital Filtering Considerations for TIO-Based Devices" and "Digital Filtering Considerations for C Series and M Series Devices". In Windows, this help file installs with NI-DAQmx to Start » Programs » National Instruments » NI-DAQ.
  • For more information on how to use the ANSI C functions, see the NI-DAQmx C Reference Help at Start » Programs » National Instruments » NI-DAQ.