FB_MovingAverage - Init (Method)

Overview

Type:

Method

Available as of:

V1.0.7.0

Versions:

Current version

Task

Initializing the memory area of FB_MovingAverage

Description

The memory area of FB_MovingAverage is being initialized. After calling up this method the properties of FB_MovingAverage provide the following values:

olrAverage: 0.0

ouiLevel: 0

ouiOrder: Value of i_uiOrder, if valid

This method has to be called up at least once before calling up the Insert method.

Interface

Input

Data type

Description

i_uiOrder

UINT

Number of measured values from which the mean value is supposed to be generated

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic.

A value not equal to ET_Diag.Ok corresponds to an diagnostic message.

q_etDiagExt

ET_DiagExt

POU-specific output on the diagnostic.

q_etDiag = ET_Diag.Ok -> Status message

q_etDiag <> ET_Diag.Ok -> Diagnostic message

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value

Description

OK

Ok

0

Ok

InputParameterInvalid

OrderRange

261

The order is outside the valid range.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Ok

The initialization of FB_MovingAverage was run successfully

OrderRange

Enumeration name:

OrderRange

Enumeration value:

261

Description:

The order is outside the valid range.

Issue

Cause

Solution

-

An invalid value has been transferred to the i_uiOrder input.

A value with the following limits has to be created at the i_uiOrder input: 0 < i_uiOrder <= Gc_uiMovingAverageMaxOrder