Open ochoadavid opened 6 years ago
@ochoadavid, This firmware tries to maintain non floating point calculations in order to keep the code as fast as possible without division errors. Can you make these changes using integer math instead of floating point?
Hi!
Ok. I will try to change the implementation as soon as I've some time.
Thanks @ochoadavid !
Hi! I implemented a constant acceleration move function. I wonder if it can be useful to someone else. Few thinks to note:
I'm certain that there is a better way to implement this. In this implementation the velocity is adjusted by the actual position. The function used is: V= 2 V_max t (0 < t < 0.5) V= 2 V_max - 2 V_max * t (0.5 < t < 1.0) (using t as a lineal position parameter)
The moveCA command takes two arguments: the absolute position and the max speed in RPM. Given the nature of a CA movement the max speed should be adjusted to have a reasonable movement time for each movement as the same RPM will produce slow acceleration rates in long movements and fast acceleration in short movements.
Fine adjusting the pid parameters could still be necessary in some dynamics.