To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI shows how to extract the correct frequency values from the output of the Spectral Measurements VI
Description
This VI demonstrates how to display the frequency value(s) of the peaks formed by taking the FFT of a signal(s) with the Spectral Measurements VI. Using the Detect Peaks VI alone will not always retrieve the correct frequency value, especially when manipulating multiple signals that contain different frequency resolutions (df) and/or different start frequencies (f0).
In the attached example, three sine waves of different frequencies serve as the input signal to the Spectral Measurements VI. The output of the Spectral Measurements VI is an array of clusters; each cluster in the array represents one of the three sine waves. It is necessary to unbundle each of the sine waves into its respective components (f0, df and magnitude), such that we can represent the correct frequency values that occur for each peak. The Peak Detector VI maps the frequency location at which a peak occurs, but this is not necessarily the correct frequency value represented on the graph. The graph's frequency value is actually equal to the peak location*df + f0.
Requirements: LabVIEW 2012 (or compatible). Hardware: none.
Steps to Implement or Execute Code
Additional Information or References:
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Can someone please attach the vi file for the above task?
The "for loop" has no loop count?
Insiderbe wrote:
The "for loop" has no loop count?
The Autoindexing Tunnel tells the FOR loop how many times to iterate (the size of the array).