MATH.Derivative (FB)

(CAA_Mathematics.library)

This function will approximate the first derivative (gradient) of a functionat the actual time   with respect to the values  of the last three function calls according to the BDF method:

Input:

xEnable

BOOL

reset (see “CAA 指南”)

lrInputValue

LREAL

actual function value

udiTM

UDINT

length of time interval  (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