beautypg.com

Averagepeaks – MTS Multipurpose Elite User Manual

Page 264

background image

Parameters

VarArray - The data array to be analyzed.

PeakCriterion - A percentage of the peak magnitude used to detect when peaks occur.

NumberOfPeaks - The number of minimum peaks to include in the calculations.

StartIndex - The optional index into the array used as the starting location for the calculation.

EndIndex - The optional index into the array used as the ending location for the calculation.

Threshold - The optional minimum value, in array units, which must be exceeded before the data is used
in the calculation.

Unit Class

Same as array data.

Example

AverageMinPeaks(_Load, LoadMinPeakCriteria, 5, 0, SizeOfArray(_Load)-1,MinimumLoad)

This formula:

1. Searches the _Load channel.

2. Looks for drops in the value of _Load channel that correspond to the input LoadMinPeakCriteria.

3. Determines the average of the 5 minimum peaks.

4. Searches between the first data point and the last data point.

5. Calculates the result only if the _Load channel becomes greater than the value of the input MinimumLoad.

AveragePeaks

The AveragePeaks function calculates the average of the maximum peaks located in the data using the
specified criterion.

Returns

The average of the maximum peaks.

Syntax

AveragePeaks(VarArray, peakCriterion[, startIndex, endIndex, numberOfPeaks, threshold])

Parameters

VarArray - The array data being analyzed.

PeakCriterion - The percentage of change from the peak that identifies the valley.

StartIndex - The optional starting index of the region to analyze.

EndIndex - The optional ending index of the region to analyze.

NumberOfValleys - The optional maximum number of valleys to identify.

Threshold - The optional threshold that has to be exceeded to start looking for peaks.

264 | MTS TestSuite

Working with Variables