Waveform Peak Detection for N Chan VI
- Updated2025-07-30
- 4 minute(s) read
Finds the locations, amplitudes, and second derivatives of peaks and valleys in Signal In. Wire data to the Signal In input to determine the polymorphic instance to use or manually select the instance.
This VI is similar to the Peak Detector VI.

Inputs/Outputs
peaks/valleys
—
peaks/valleys indicates whether to find peaks or valleys.
Signals In
—
Signals In contains the waveforms in which to find peaks or valleys.
threshold
—
threshold instructs the VI to ignore peaks and valleys that are too small. The VI ignores peaks if the fitted amplitude is less than threshold. The VI ignores valleys if the fitted trough is greater than threshold.
width
—
width specifies the number of consecutive data points to use in the quadratic least squares fit. The value should be no more than about 1/2 of the half-width of the peak/valley and can be much smaller (but > 2) for noise-free data. Large widths can reduce the apparent amplitude of peaks and shift the apparent location. For noisy data, this modification is not important because the noise obscures the actual peak.
error in
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
initialize (T)
—
initialize, when TRUE (default), causes the VI to process the first block of data. The VI requires some internal setup that must be done at the start for proper operation.
end of data (T)
—
end of data (T), when TRUE (default), causes the VI to process the last block of data. The VI cleans up internal data after the last block has been processed.
# found
—
# found is the number of peaks/valleys found in the current block of data. # found is the size of the arrays Locations, Amplitudes, and 2nd Derivatives.
Locations
—
Locations contains the index locations of all peaks or valleys detected in the current block of data for each waveform.
Amplitudes
—
Amplitudes contains the amplitudes of peaks or valleys found in the current block of data for each waveform.
2nd Derivatives
—
2nd Derivatives gives measurements of the second derivative of the amplitude at each of the peaks or valleys found in the current block of data for each waveform.
error out
—
error out contains error information. This output provides standard error out functionality. |
Refer to the support document at ni.com for more information about peak detection using LabVIEW.
peaks/valleys
—
Signals In
—
threshold
—
width
—
error in
—
initialize (T)
—
# found
—
Locations
—
Locations
—
error out
—