NI-DAQmx: Buffered Period Measurement with External Counter Source
Overview
This program demonstrates how to make a buffered edge count with reset using the buffered period measurement. The number of edges of a source signal will be counted and each time the gate signal has a rising edge the count will be stored in the buffer and reset.
Downloads
Filename: buffered_edge_count_reset.vi
Requirements: View
This program demonstrates how to make a buffered edge count with reset using the buffered period measurement. The signal to be measured is connected to the source of the counter by selecting the corresponding PFI line on the front panel. The number of edges of the source signal is counted between the rising edges of the gate signal. Once a rising edge of the gate signal is observed, the count value is moved into the buffer and the count is reset. This functionality is shown in Figure 1.
The typical buffered period measurement will measure the gate signal using a known internal time base as a reference. Counting the number of edges of the known time base between rising edges of the gate signal allows for a calculation of the period of the gate signal. The output is in seconds by default and is based on the known rate and the number of edges counted. This example changes the units of the output to ticks, so scaling is not a factor. This example also changes the counter source from an internal time base to the selected channel.
*NOTE: The first result of the measurement is not an accurate representation because it is a measure of the number of edges of the source signal between the beginning of the measurement and the first rising edge of the gate.
Figure 1: Example buffered edge count with reset measurement
Requirements
Filename: buffered_edge_count_reset.vi
Software Requirements
Application Software: LabVIEW Base Development System 8.0
Hardware Requirements
Hardware Group: CompactDAQ, Multifunction DAQ (MIO), Counter/Timers (TIO)
Driver: NI-DAQmx 8.7.1
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/).

