0

DerivitiveOf

Greg R 2 years ago updated by Edward Polzin 2 years ago 1

When using the DerivitiveOf function on a value that stems from a CAN message coming in less than every cycle, the derivitive is incorrect because the time over which the change occured is not a single cycle time. We have been using a timer to calculate the rate of change. I am not sure if there is a simple solution for this but it would be nice. Perhaps it could use a flag from the CAN frame and calculate the time between them, or something like that.

I think solution for this would be to use a math channel and bring the CAN parameter into that math channel using a single object.  Then use a second math channel to do the derivative.  This may also work combining both into the same math channel (CAN parameter as object A, then derivative of object A as object B), but i did not test that case.