The dynamic averaging method for frequency and period measurements provides configuration options that can be set before the start of an acquisition. These options affect the amount of averaging or filtering applied to the counter measurements allowing for tradeoffs in measurement accuracy and noise versus latency. During the acquisition, the counter continuously measures and filters the input signal periods to produce frequency or period measurements. The NI 9326 and 9361 use this method.
The NI 9326 can enable low pass filtering of counter signals to give accurate measurement of in-band frequencies while rejecting higher frequency noise. Set the CI.Filter.Enable attribute/property to true to enable filtering. Filtering is enabled by default and is recommended as the easiest way to achieve accurate, low-noise counter measurements.
With filtering enabled, you can then specify the filter cutoff frequency using the CI.Filter.Freq attribute/property to control amount of filtering applied. Lower cutoffs provide lower noise but longer latency. The latency of the filter can be queried using the CI.FilterDelay attribute/property. Each counter can be configured with independent settings.
If CI.Filter.Enable is set to false or if counter filtering is not supported on your device, then the dynamic averaging method produces measurements by averaging one or more periods of the input signal. The amount of averaging performed is controlled by the following:
The input divisor and measurement time settings wired into DAQmx Create Virtual Channel VI are ignored. Instead, DAQmx calculates default values for these settings based on the minimum and maximum values wired to the DAQmx Create Virtual Channel VI. You can use a channel property node to override these defaults allows for better control over the amount of averaging applied to your application.
During an acquisition, the dynamic averaging method will average between 1 period and divisor periods of the input signal to determine the input signal's frequency. The measurement time property sets an upper limit to the amount of time that is used for this averaging. As a result, the dynamic averaging method balances measurement accuracy vs. measurement latency throughout the input signal range as shown in the following table.
|Signal Frequency||Counter Behavior|
(Divisor*Input Signal Period < Measurement Time)
|Measures divisor periods of signal.|
(Input Signal Period < Measurement Time < Divisor*Input Signal Period)
|Measures between 1 and Divisor periods of the signal, depending on the number of periods that fit within the Measurement Time.|
(Input Signal Period >= Measurement Time)
|Measure 1 period of signal.|
(Input Signal Period > Maximum Measurable Period)
|Input signal is slower than the maximum measurable period. 0 Hz returned.|
The measurement time and divisor can also be set manually using the property node before the acquisition starts if the auto measurement settings are not desired. The measurement time or divisor can be disabled by setting it to zero.
|0||1||Measure 1 period of the input signal, similar to the 1 Counter (Low Frequency) method.|
|Input measurement time||0||Counts the number of periods of the input signal that occur during input measurement time, similar to the 2 Counters (High Frequency) method.|
|0||Input divisor||Counts how long it takes for the input divisor periods of the signal to elapse, similar to the 2 Counters (Large Range) method.|
You can view examples of the dynamic averaging method in the NI 9361 datasheet, which you can find at ni.com/manuals.