
LIN Stepper Software Description
Designer Reference Manual
DRM047 — Rev 0
58
LIN Stepper Software Description
MOTOROLA
NOTE:
To stop or reverse the motor, the motor must slow down to
frequencyStart and provides DECEL_AFTERRAMP_RESERVE steps
with frequencyStart. This is provided by the condition
positiondecelAfterRamp =< 0. When positiondecelAfterRamp is
initialized to DECEL_AFTERRAMP_RESERVE by
FrequencyAcceleration routine (see
).
The speed acceleration and deceleration subroutines are used for linear
acceleration and deceleration ramping. They are shown in
.
Figure 6-4. Frequency Acceleration and Deceleration - Flow Chart
frequencyActLowHigh= Frequency
Deceleration (frequencyActLowHigh,
acceleration, positionDecelDistance,
frequencyStart)
Return
positionDecelAfterRamp--
(limited to 0)
positionDecelDistance--
(limited to 0)
frequencyActLowHigh -=
periodStep*acceleration
frequencyStart >
frequencyActLowHigh.Byte.Hi
gh
frequencyActLowHigh =
frequencyStart
Yes
No
frequencyActLowHigh= Frequency
Acceleration (frequencyActLowHigh,
acceleration, positionDecelDistance,
frequencyReq)
Return
frequencyReq >
frequencyActLowHigh.Byte.Hi
gh
frequencyActL=
periodStep*acceleration
Yes
positionDecelD+
positionDecelAfterRamp =
= DECEL_AFTERRAMP_RESERVE
frequencyActLowHigh =
frequencyReq
frequencyReq <=
frequencyActLowHigh.Byte.Hi
gh
Yes
No
No
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
.
..