FB_FlowEstimation - SetTimePeriod (Method)

Overview

Type:

Method

Available as of:

V1.6.0.0

This chapter provides information on:

Task

Set the time period used for the estimation.

Description

The method SetTimePeriod sets a time period that is used to perform the flow estimation.

NOTE:
  • A large time period would allow a more stable estimation that would not be much affected by local oscillations in the observed flow.

  • A small time period would allow the average estimated flow to quickly change in case of variations of the observed flow.

Interface

Input

Data type

Description

i_timValue

TIME

Time period to configure.

Output

Data type

Description

q_etDiag

GD.ET_Diag

General library-independent statement on the diagnostic. A value unequal to ET_Diag.Ok corresponds to a 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

q_sMsg

STRING(80)

Event-triggered message that gives additional information on the diagnostic state.

Diagnostic Messages

q_etDiag

q_etDiagExt

Enumeration value of q_etDiagExt

Description

Ok

Ok

0

Ok

Ok

TimePeriodChanged

177

The time period has been changed.

InputParameterInvalid

TimePeriodRange

175

The time period value is invalid.

Ok

Enumeration name:

Ok

Enumeration value:

0

Description:

Success

Status message: Reading the data was successful.

TimePeriodChanged

Enumeration name:

TimePeriodChanged

Enumeration value:

177

Description:

The time period has been changed.

Since the value of the new time period was different from the one previously configured, a reset of the internal data of the function block has been executed.

TimePeriodRange

Enumeration name:

TimePeriodRange

Enumeration value:

175

Description:

The time period value is invalid.

Issue

Cause

Solution

The time period was not successfully set.

The value of i_timValue is null.

Ensure that i_timValue has a strictly positive value.