View Full Version : DERIVATIVE function block clarification

05-17-2012, 04:27 PM
I am using the DERIVATIVE function on the CR1051 to calculate the rate of change of a value put onto the CAN bus every 100 ms and read by the CR1051. My PLC cycle time is roughly 20-30 ms.

What is the best time base to use with the DERIVATIVE function block, the PLC cycle time or the frequency of the data being put onto the CAN bus (100 ms)?


Erik Gerrits
05-17-2012, 07:46 PM
The DERIVATIVE function block comes from 3S so here is what they say:

In order to obtain the best possible result, DERIVATIVE approximates using the last four values, in order to hold errors which are produced by inaccuracies in the input parameters as low as possible.

If you are getting 20 - 30 ms scan times I would make your TM value 120 ms. Its a DWORD, so just put in 120.