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

DAQ-STC: Measuring the Frequency of a TTL Signal (Easy-Level VIs)

2 ratings | 2.50 out of 5
Print

Downloads

Filename: 2053.zip
Requirements: View

This VI measures the frequency of a TTL signal by counting the number of rising edges at the SOURCE input that occur during a known pulse at the GATE input. This VI works with devices that have a DAQ-STC counter timer chip. Examples of these devices are the PXI-6070, PCI-MIO-16E-1, and AT-MIO-16E-2.

INSTRUCTIONS:
1. Enter the device number of your board.
2. Enter the counter number to use.
3. Enter a gate width.
4. Make the appropriate I/O connections as explained below.
5. Run the VI.

KEY PARAMETERS:
This VI shows how to use the Easy level Measure Frequency.vi to measure frequency. The frequency is determined by counting the number of rising edges that occur during your chosen gate width time, and dividing that count by the actual gate width. This method is good for high frequency signals, when a large number of cycles will occur in a reasonable period of time. Two counters are used for this example. Your chosen counter counts the rising edges, and counter-1 provides the gate pulse.

The gate width you choose determines the range of frequencies you can measure. A longer gate width will give a more accurate frequency measurement. However, a longer gate width also limits the upper frequency you can measure without reaching the terminal count (TC) of the 24-bit counter.
Period is determined by taking the inverse of the frequency.

I/O CONNECTIONS:
Connect the TTL signal you want to measure to the SOURCE of your chosen counter.
Connect the OUT of counter-1 to the GATE of your chosen counter
To find the actual pin numbers, refer to the hardware user manual.
To find counter-1 to counter relationships, see the Counting Signals Highs and Lows chapter of the Data Acquisition Basics Manual.

DAQ VIs USED:
Measure Frequency.vi

***NOTE: This example uses the Traditional NI-DAQ (Legacy) driver. NI-DAQmx is the latest data acquisition driver provided by National Instruments. We recommend using the NI-DAQmx equivalent of this example (linked below). Please refer to the related links for more information on NI-DAQmx.


Related Links:
NI-DAQmx: Measure High Frequency 2 Counter Method
NI-DAQmx Frequently Asked Questions
Learn 10 Functions in NI-DAQmx and Solve 80% of Data Acquisition Applications
Transition from Traditional NI-DAQ to NI-DAQmx

Requirements


Filename: 2053.zip

Software Requirements


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

Hardware Requirements


Hardware Group: Multifunction DAQ (MIO)
Driver: Traditional NI-DAQ (Legacy)

 
2 ratings | 2.50 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/).