Configure

Configure the algorithm.

Syntax

Definition:

METHOD Configure : BOOL
VAR_INPUT
    bUseBesselCorrection : BOOL;
    eWindowMode : E_ALY_WindowMode;
    nWindowSize : UDINT;
END_VAR

Configure 1: Inputs

Name

Type

Description

bUseBesselCorrection

BOOL

If the parameter bUseBesselCorrection is set to TRUE, Bessel's correction is applied. This parameter must be enabled in order to obtain an expected result for random samples.

The empirical standard deviation, without Bessel's correction

Configure 2:

The empirical standard deviation, with Bessel's correction

Configure 3:

eWindowMode

E_ALY_WindowMode

Used window mode. Influences the amount of input data included in the calculation and the timing of the calculations.

  • Continuous: All input values since the start of the algorithm are included in the calculation. The calculation is performed cyclically.
  • Fix Window: Only the last N input values are included in the calculation. The calculation is done every N calls.
  • Sliding Window: Only the last N input values are included in the calculation. The calculation is performed cyclically.

nWindowSize

UDINT

Depending on the window mode used, you can configure the number of values N that will be included in the calculation. In the window mode Continuous this parameter is ignored.

Configure 4: Return value

Name

Type

Description

Configure

BOOL

Returns TRUE if successful.