MATH.Integral (FB)

 

(CAA_Mathematics.library)

This function block will approximate the integral of the function math_image089.png over the time interval between the first function call math_image091.png and the actual time math_image093.png :

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

math_image103.png 

lrInputVariable.

Input:

xEnable

BOOL

reset (see Guideline for CAA libraries)

lrInputValue

LREAL

function value

udiTM

UDINT

size of time interval math_image087.png (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)