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.