FUNCTION_BLOCK DERIVATIVE
Approximates the derivative of a given value in its time course
Four consecutive values are recorded and used in the calculation so that the resulting derivative is as accurate as possible.
Example: Function block in FBD
InOut:
Scope |
Name |
Type |
Comment |
Input |
IN |
REAL |
Input value |
TM |
DWORD |
Time since last call in msec |
|
RESET |
BOOL |
TRUE: OUT is set to zero and saved values are set to the current input IN |
|
Output |
OUT |
REAL |
Derivative |