Configure

Configure the algorithm.

Syntax

Definition:

METHOD Configure : BOOL
VAR_INPUT
    nNumValues : UDINT;
    eStartupBehaviour : E_ALY_MovingAvgStartupBehaviour;
END_VAR

Configure 1: Inputs

Name

Type

Description

nNumValues

ULINT

Number of values included in the calculation of the moving average.

eStartupBehaviour

E_ALY_MovingAvgStartupBehaviour

Calculation behavior at the beginning of the analysis with less values than configured in Num Values.

ZeroPadding: The missing values are filled with zeros.

UseFirstValue: The first value is used until the number of values equals Num Values.

WaitUntilFilled: The first result is calculated when the number of values equals Num Values.

AvgOverExisting: The average is calculated with the already existing values until the number of values equals Num Values.

Configure 2: Return value

Name

Type

Description

Configure

BOOL

Returns TRUE if successful.