Stopping Speed
Starting Speed
Steps to Stop
Number of Steps
Acceleration Rate
Target Speed
Introduction
The
Motion Control
frame gathers user information regarding stepping rate, or motor speed. An
acceleration profile is employed to start at a programmable speed and increase stepping rate until
reaching the programmable desired speed.
An internal 8-MHz timer is used to measure time and generate the steps on a timely manner. The GUI will
send the information to the microcontroller as PPS, and the microcontroller will transform it into the
respective clock cycles needed for the timer to generate accurate STEP pulse timing.
2.6.1
Start/Stop Steps
The acceleration profile is coded inside of the microcontroller to accept both the starting speed PPS and
target speed PPS as a clock cycle number. When the start steps command is issued (
Starts/Steps
button
is selected), the PWM timer generates steps at a rate specified by the start speed PPS parameter.
When accelerating or decelerating, PPS is adjusted every 32 ms, based on the integer value of PPSPS/32
ms. If a non-zero value of PPSPS is entered, a minimum value of 1 is used. The step rate is increased by
the calculated value until the target speed is reached.
The very same start steps command computes how frequent automatic speed updates are issued and a
second timer is used to change the speed according to the programmed acceleration rate profile.
Once the target speed (PPS) is reached, the acceleration profile ends and the motor stays running until
the stop stepper command is issued (
Start/Stop Steps
button is selected again). When the stepper is
commanded to stop, the controller does exactly as it did while accelerating, but in reverse to decelerate
until the stop speed PPS is reached, in which case the motor fully stops.
A second motor actuation is provided by the
Move # of Steps
and
Reciprocate
commands in which a
programmed number of steps are issued and then the motor stopped. The acceleration and deceleration
profiles work similarly as before, except when the deceleration starts and when the motor actually stops
are a function of the
Steps to Stop
and deceleration rate parameters.
This second motor actuation is adjusted automatically for rising edge or rising and falling edge settings in
the STEP MODE.
The following figure shows the acceleration profile and the role each parameter plays during speed
computation:
2.6.2
Move Steps
If the user desires to move the stepper a certain number of steps, this can be accomplished by using the
move steps function. Parameters from the other frames are reused and its utilization is as explained
previously. Two new parameters have been added to properly control the limited number of steps
actuation.
Number of Steps:
Number of steps the controller will issue.
Steps to Stop:
The controller is continuously monitoring the step being issued and when the current step
is equal to the steps to stop parameter, a deceleration profile is issued. If
Steps to Stop
is larger than the
number of steps, then the motor stops abruptly and without undergoing a deceleration profile.
When a deceleration profile is issued, the controller decreases the speed until reaching the stop speed
value. If the number of steps parameter is met before the deceleration profile is complete, then the motor
stops at the current speed. If the stop speed is met before all the number of steps is issued, then the
motor rotates at the stop speed value until all the steps are executed.
7
SLLU203A – June 2014 – Revised March 2015
DRV8846 Evaluation Module
Copyright © 2014–2015, Texas Instruments Incorporated