Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 26, 2007

NI-DAQmx: Frequency Measurements Using Counters

0 ratings | 0.00 out of 5
Print

Downloads

Filename: daqmx_freq_counters.zip
Requirements: View

The three frequency measurement methods described below are:
Method 1 -- Inverse Period Measurement
Method 2 -- Count Number of Pulses in Known Time
Method 3 -- Measure Time of Known Number of Cycles

METHOD 1: Inverse Period Measurement

The simplest method is period measurement. You can measure the period by counting the rising or falling edges of a known source frequency between the two consecutive rising or falling edges of the unknown frequency. By taking the frequency of the known source and dividing by the count, you can calculate the period of the unknown signal. This type of measurement is suitable for low frequency measurement.

METHOD 2: Count Number of Pulses in Known Time

Method 1 works well as long as the frequency of the signal to be measured is significantly slower than the known source frequency. As the frequency of the signal to be measured increases to approach the frequency of the source frequency, measurement error increases. To improve the accuracy of the frequency measurement for higher unknown frequency, we can use this second measurement method, count number of pulses in known time. In this configuration, the counter will count number of unknown high frequency during a period of known signal. The frequency can be calculated by multiplying the count by the frequency of the unknown signal.

By using two counters, you can get more accurate frequency measurement for higher frequencies. The larger the period of the known signal used to gate the counting, the smaller the measurement error.

METHOD 3: Measure Time of Known Number of Cycles

The inverse period measurement method is suitable for lower frequency measurements while the second measurement method can achieve higher accuracy with higher frequency signals. However, if your application involves measuring a pulse width modulated signal and the span of the frequency range covers both low and high frequencies, then this third measurement method can be considered.

Similar to measurement method 2, count number of pulses in known time, this measurement method also uses two counters. The first counter is used to divide down the frequency of the signal to be measured; then the second counter is used to measure the period of the divide down frequency. The actual frequency can be calculated by multiplying the resulting frequency measurement by the divide down value. With this frequency method, the larger the divide down value, the slower the resulting frequency, and more accurate the measurement result.

Requirements


Filename: daqmx_freq_counters.zip

Software Requirements


Application Software: LabVIEW Base Development System 7.0
Language(s): LabVIEW

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO), Counter/Timers (TIO)
Hardware Model: PCI-6013, PCI-6014, PCI-6023E, PCI-6024E, PCI-6025E, PCI-6031E, PCI-6032E, PCI-6033E, PCI-6034E, PCI-6035E, PCI-6036E, PCI-6040E (PCI-MIO-16E-4), PCI-6052E, PCI-6071E, PCI-6110, PCI-6111, PCI-6115, PCI-6120, PCI-6122, PCI-6123, PCI-6132, PCI-6133, PCI-6143, PCI-6220, PCI-6221, PCI-6221 (37-Pin), PCI-6222, PCI-6224, PCI-6225, PCI-6229, PCI-6250, PCI-6251, PCI-6254, PCI-6259, PCI-6280, PCI-6281, PCI-6284, PCI-6289, PCI-6601, PCI-6602, PCI-6608, PCI-6624, PCI-7030/6030E, PCI-7030/6040E, PCI-7040/6030E, PCI-7040/6040E, PCI-7041/6040E, PCI-6070E, PCI-MIO-16E-2, PCI-6030E, PCI-6011E, NI PCIe-6251, NI PCIe-6259, PXI-6023E, PXI-6024E, PXI-6025E, PXI-6031E, PXI-6032E, PXI-6033E, PXI-6035E, PXI-6052E, PXI-6071E, PXI-6115, PXI-6120, PXI-6122, PXI-6123, PXI-6132, PXI-6133, PXI-6220, PXI-6221, PXI-6224, PXI-6225, PXI-6229, PXI-6250, PXI-6251, PXI-6254, PXI-6259, PXI-6280, PXI-6281, PXI-6284, PXI-6289, PXI-6601, PXI-6602, PXI-6608, PXI-6624, PXI-7030/6030E, PXI-7030/6040E, PXI-7040/6030E, PXI-7040/6040E, PXI-7041/6040E
Driver: NI-DAQmx 8.0

 
0 ratings | 0.00 out of 5
Print

Reader Comments | Submit a comment »

Good examples
The examples included in the .zip should be added to the examples that ship with LV.
- Mar 27, 2009

 

Legal
This example program (this "program") was developed by a National Instruments ("NI") Applications Engineer. Although technical support of this program may be made available by National Instruments, this program may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this program with each new revision of related products and drivers. THIS EXAMPLE PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).