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
xEnableBOOLTRUE: Activates the defined operationFALSE: Aborts/resets the defined operationLConC
Output
xBusyBOOLTRUE: Operation is runningLConC
xErrorBOOLTRUE: Error condition reachedLConC
Input Const
itfAntiWindUpRepresents the desired anti-windup strategy (If not set: no anti-windup strategy is applied)
Input
lrValueLREALRepresents the current value that shall be integrated
lrCycleIntervalLREALRepresents the elapsed time since the last call in [second]
lrStartValueLREAL0
The value that the Integrator shall be filled with
Output
lrOutputValueLREALRepresents the current value of the integral
xOverflowBOOLFALSE
TRUE: Indicates that an overflow occured in the integratorFALSE: No overflow occuredeErrorIDERROR.NO_ERROR
The current error.Only valid ifxErrorisTRUE.
Properties:
CurrentIntegral, inherited from Integrator_Base
CycleInterval, inherited from Integrator_Base
LastSegmentIntegralValue, inherited from Integrator_Base
OutputValue, inherited from Integrator_Base
Overflow, inherited from Integrator_Base
Methods:
ApplyAntiWindUpCorrection, inherited from Integrator_Base
CheckBoundaries, inherited from Integrator_Base
CyclicAction, inherited from Integrator_Base
CyclicCall, inherited from Integrator_Base
Reset, inherited from Integrator_Base
ResetAction, inherited from Integrator_Base
StartAction, inherited from Integrator_Base
Structure: