Acceleration of a stepper motor starting from non-zero speed

Yes, that's exactly what's happening. Also, I followed your recommendations and now the code is cleaner. Now I have realized something else, the problem comes down to controlling the acceleration of the engine while it is in motion, is that true?