Configure

Configuring the algorithm.

Configuration options

  • Threshold Reversal: threshold for identifying reversals. Reversals are only detected if their difference from the next reversal exceeds the value of Threshold Reversal.
    Below are three examples of peak identification using the parameter Threshold Reversal.
    (a) The value y3 is identified as a peak immediately after processing the value y4 because the difference between y3 and y4 is greater than Threshold Reversal.
    (b) The value y3 is not identified as a peak because the difference between y3 and y4 is smaller than Threshold Reversal and the curve starts rising again after y4.
    (c) The value y2 is identified as a peak after processing the value y5 because the difference between y2 and y5 exceeds Threshold Reversal. The value y2 cannot be identified as a peak beforehand because the difference between y2 and y3 (y4) is less than/equal to Threshold Reversal and it is not known whether the values will continue to decrease.
Configure 1:

Syntax

Definition:

METHOD Configure : BOOL
VAR_INPUT
    fThresholdReversal : LREAL;
    bUseRelativeTolerance : BOOL;
    fErrorTolerance : LREAL;
END_VAR

Configure 2: Inputs

Name

Type

Description

fThresholdReversal 

LREAL

Threshold for peak analysis

bUseRelativeTolerance 

BOOL

Boolean flag. If this flag is True, the parameter Error Tolerance refers to the setpoint at the input as a percentage. Otherwise, an absolute tolerance band is taken into account.

fErrorTolerance 

LREAL

Specifies the size of the tolerance band in relation to the parameter Relative Tolerance. Since tolerance band is updated when parameter identification is restarted.

Configure 3: Return value

Name

Type

Description

Configure

BOOL

Returns TRUE if successful.