Counter Input Frequency is Different When Digital Filtering Is Enabled

Updated Oct 3, 2023

Reported In

Hardware

  • Counter/Timer Device

Driver

  • NI-DAQmx

Issue Details

I am acquiring 60 kHz of counter input using LabVIEW. When I enable the digital filtering on the counter input frequency task and set the digital filtering minimum pulse width equal to 1us, the sensitivity of the counter input frequency decreases. The result I obtained from the counter input frequency task is between 58.823 kHz and 60.606 kHz. Meanwhile, without enabling the digital filtering, the result I obtained was between 60.015 kHz and 60.060 kHz.
Why does enabling digital filtering lower the sensitivity of the counter input frequency? How should I increase the sensitivity of the counter input frequency task while enabling the digital filter?

Solution

When you enable digital filtering, you must configure the digital filtering minimum pulse width property. The value set for digital filtering's minimum pulse width will affect the sensitivity of the acquired frequency of the signal. If the digital filter is enabled, the minimum pulse width to be read by the device is one-half of the minimum pulse width attribute. This means that when you provide 1 µs of minimum pulse width, the pulse width that you are able to read is 0.5 µs, 1 µs, 1.5 µs, 2 µs, and so on. The period for 60 kHz is around 16.67 µs (T = 1/f). After you enable the digital filtering, the device can only read 16.5 µs (which is 60.6061 kHz) or 17 µs (which is 58.8235 kHz).

In order to increase the sensitivity of the acquired frequency, you could set the minimum pulse width for the digital filtering to be the lowest. One method to check what the lowest value could be set as the digital filtering minimum pulse width is to set the value for the minimum pulse width to be very low, eg., 1ns. After that, run LabVIEW and check what the minimum value that could be set is from the error message that pops out. Below is the error -200077 when the minimum pulse width value of the CI Frequency Digital Filtering is set to below the minimum value that it can be set to. 
Error 200077.PNG
Once the minimum pulse width is set to 100 ns, the error -200077 will be gone.

When you set the digital filtering minimum pulse width value to the lowest, which is 100 ns for PCI-6601, this means that you can read the frequency for 60 kHz between 16.65 µs (which is 60.060 kHz) and 16.70 µs (which is 59.880 kHz).