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

Document Type: Example Program
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

Measuring Low Frequencies with LabVIEW and FieldPoint Using [c]FP-CTR-500/502

1 ratings | 5.00 out of 5
Print

Downloads

Filename: 25143.vi
Requirements: View

Filename: 25142.vi
Requirements: View

You can measure frequency in two ways using a counter.
1) Measure the time it takes for a set number of pulses to pass or,
2) Count the number of pulses that pass in a set amount of time.

For low-frequency signals it is best to measure the time duration of a set number of pulses. If we tried to calculate the number of pulses that passed in a set amount of time, we would need a long gate period to get accurate results.

The drawback of measuring the amount of time it takes for a set number of pulses to pass is that the sample period varies with the frequency of the signal.

To accurately measure low frequencies with a CTR module, select two counter channels, one output channel, and one gate input channel. Count Input 0 counts the pulses of the signal that we are measuring. The output of the counter is set to high for x pulses and low for x pulses, which is used as the gate of Count Input 1. The source of Count Input 1 is the internal clock reference (the example can be modified to use an external clock reference). During the high phase of Count Input 0, Count Input 1 counts the pulses of the clock reference.
During the low phase, we read channel 1 and reset the counter.
For example, if the output of Count Input 0 is set to high for 4 pulses and the signal has a frequency of 20 Hz, the output of Count Input 0 is high for 200 ms. During the high phase, we will count 200 counts if we are using the 1 kHz internal clock reference. So to calculate the frequency, we have F = #pulses/duration = timebase * terminal count/counts = 1000 Hz * 4 terminal counts/200 counts = 20 Hz.


Related Links:
Measure Frequency with LabVIEW and FieldPoint Using FP-CTR-500/502

Requirements


Filename: 25143.vi

Software Requirements


Application Software: LabVIEW Full Development System 7.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: FieldPoint
Driver: NI-FieldPoint 4.1

 
Filename: 25142.vi

Software Requirements


Application Software: LabVIEW Full Development System 6.1
Language(s): LabVIEW

Hardware Requirements


Hardware Group: FieldPoint

 
1 ratings | 5.00 out of 5
Print

Reader Comments | Submit a comment »

 

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/).