A method is employed to eliminate undesired velocity reversal in a motion
profile. A start speed, a start acceleration, a speed limit, an
acceleration limit, a deceleration limit, an acceleration jerk limit, and
a deceleration jerk limit are programmed for the motion profile. A
critical jerk value needed to avoid velocity reversal associated with the
motion profile is calculated. The critical jerk value is compared to the
programmed deceleration jerk limit. The larger of the critical jerk value
and the programmed deceleration jerk limit is set as a computed maximum
deceleration jerk limit for use with the motion profile. In this manner,
the computed maximum deceleration jerk limit will never be lower than the
critical jerk and undesired velocity reversal is eliminated.