mp49 / parker6k

EPICS support for the Parker 6K controller
1 stars 2 forks source link

Fix S curve acceleration issues #14

Closed mark0n closed 9 years ago

mark0n commented 9 years ago

In some rare cases the S curve acceleration values are not computed correctly. Here is an example: let's say accel = 0.186 then

// the following two lines are equivalent to the driver code
printf("A=%.*f\n", 2, accel);
printf("AA=%.*f\n", 2, accel/2);

prints

A=0.19
AA=0.09

which does not satisfy the 1/2A =< AA =< A condition and causes the following error:

*INVALID CONDITIONS FOR S_CURVE ACCELERATION-AXIS 1

See p. 12 of http://www.parkermotion.com/manuals/gemini/Gem6K/Gem6K_CR.pdf

mp49 commented 9 years ago

Thanks for fixing this. I've seen the same issue and I've been meaning to get round to it.