FB_MovingAverage - SetOrder (Method)

Overview

Type:

Method

Available as of:

V1.0.7.0

Versions:

Current version

Task

Define number of values for mean value generation

Description

Define number of values from which the sliding-type mean value can be calculated. See FB_MovingAverage

 

The setting of the number of values to calculate the sliding-type mean value can be requested via the uiOrder property.

Interface

Input

Data type

Description

i_uiOrder

UNIT

Number of values from which the mean value is calculated

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 number of values for the mean value calculation has been successfully changed. See FB_MovingAverage

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 must be created at the i_uiOrder input: 0 < i_uiOrder <= Gc_uiMovingAverageMaxOrder