To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI allows the user to select a tab-delimited text file created from Excel and then detect the peaks on that data
Description
This VI allows the user to select a tab-delimited text file created from Excel and then detect the peaks on that data. The data input consists of two columns - X and Y. These columns are extracted and manipulated to allow the data to be processed. After the data is processed, the locations of the peaks are reconstructed from the original waveform. The waveform and peak locations are then displayed on a single graph. A threshold can be set so that only the peaks above a certain value can be detected.
Once the data is obtained, a Peak Detection VI is used to find all the peaks above a certain threshold. That threshold is determined by moving the red cursor on the XY Graph in this front panel. The number of peaks as well as the x-index location of each peak is displayed below the graph. Since the x-index location does not correspond to the actual x-value at that index, they must be reconstructed. The outputs at the right of the graph result from searching for the s-index value in the original data and placing them into a separate array. This allows the x and y values for each peak to be displayed appropriately.
Requirements
LabVIEW 2012 Full Development System (or compatible)
Steps to Implement or Execute Code
Additional Information or References
Caveats and Additional Notes
The threshold can be changed or removed so that all peaks are detected. Also, the data must be saved from Excel in tab-delimited text format.
VI Block Diagram
**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.