MATH.Derivative (FB)

 

(CAA_Mathematics.library)

This function will approximate the first derivative math_image079.png (gradient) of a func­tionmath_image081.pngat the actual time  math_image083.png with respect to the values  of the last three function calls according to the BDF method:

math_image085.png 

Input:

xEnable

BOOL

reset (see CAA Guidelines)

lrInputValue

LREAL

actual function value

udiTM

UDINT

length of time interval math_image087.png (equals time passed since last call to function)

Output:

lrDerivative

LREAL

approximated value of first derivative

xValid

BOOL

validity of result; will be set to FALSE, if the number of calls necessary for approximating has not been executed yet