MATH.Integral (FB)

(CAA_Mathematics.library)

This function block will approximate the integral of the function over the time interval between the first function call  and the actual time :

The size of the time intervals  are integers and measured in micro seconds. The approximation is carried out by use of the explicit (lrInputvariable ) resp. implicit (lrInputvariable ) Euler method:

lrInputVariable.

Input:

xEnable

BOOL

reset (see Guideline for CAA libraries)

lrInputValue

LREAL

function value

udiTM

UDINT

size of time interval  (equals time passed since last call to function)

Output:

lrIntegral

LREAL

approximated value of integral

xOverflow

BOOL

error flag (TRUE in case of an overflow occurred)