Integrator_TrapezoidApproximation (FB)ΒΆ

FUNCTION_BLOCK Integrator_TrapezoidApproximation EXTENDS Integrator_Base

The function block approximates an integral over time.

The arithmetic mean of the current and last value is used to approximate the integral within the elapsed time.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

xEnable

BOOL

TRUE: Activates the defined operation FALSE: Aborts/resets the defined operation

LConC

Output

xBusy

BOOL

TRUE: Operation is running

LConC

xError

BOOL

TRUE: Error condition reached

LConC

Input Const

itfAntiWindUp

IAntiWindUp

Represents the desired anti-windup strategy (If not set: no anti-windup strategy is applied)

Integrator_Base

Input

lrValue

LREAL

Represents the current value that shall be integrated

Integrator_Base

lrCycleInterval

LREAL

Represents the elapsed time since the last call in [second]

Integrator_Base

lrStartValue

LREAL

0

The value that the Integrator shall be filled with

Integrator_Base

Output

lrOutputValue

LREAL

Represents the current value of the integral

Integrator_Base

xOverflow

BOOL

FALSE

TRUE: Indicates that an overflow occured in the integrator FALSE: No overflow occured

Integrator_Base

eErrorID

ERROR

ERROR.NO_ERROR

The current error.
Only valid if xError is TRUE.

Integrator_Base

Properties:

Methods:

Structure: