DERIVATIVE (FB)¶
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
INREALInput value
TMDWORDTime since last call in msec
RESETBOOLTRUE:OUTis set to zero and saved values are set to the current inputINOutput
OUTREALDerivative