Product specifications
R01AN0168ED0101 Rev. 01.01 18
Application Note
Chapter 4 Automated Motor Movement
4.1 Processing of PWM (non-ZPD) Channels
This is performed for all channels, which are enabled, and CZPn is cleared.
On processing of a channel, first the
Movement Calculator is started
(CALC_START). This block calculates a new microstep value for horizontal
and vertical PWM, and evaluates the current speed level and motor direction.
Further, the macrostep value is calculated. This is done by using an implicit
algorithm, which considers external parameters, the current absolute position
of the motor and static variables (digital processing results of previous and
current calls per channel). The
Movement Calculator indicates to the
Sequencer, when the calculation is finished. If the Movement Calculator
detects that the given target end position is reached by comparing the actual
position set with the internal position variable, and the actual movement speed
VAS is zero, it generates the per-channel signal IRQ_REACHn.
The
Movement Calculator delivers its result, which are the current microstep
values for the PWMs per channel, the associated speed levels and the motor
directions.
Using these microstep values, the
Address Generation block creates an
access address to the
PWM Value RAM. Like this, the microstep values are
translated into PWM duty cycle and quadrant settings. The
Sequencer fetches
the values
CVPn, CHPn, CQIn, IHRn and IVRn from the RAM and writes them
into the appropriate register settings of the ISM channels, where the result
becomes visible as changed PWM settings.
In summary, for each time-event of the
Update Timebase (GUD), new motor
positions are calculated for each activated channel, and by a look-up table in
the
PWM Value RAM, they are translated into PWM values for the channels.
With the next ZERO event, the new values for the PWM settings (
CVPn,
CHPn, CQI
n) and I/O control (IHRn, IVRn) will become active at the outputs.
The ZERO event is the synchronous start of a new PWM cycle. The
Sequencer is designed such, that it is capable to complete all processing of all
channels within one PWM cycle.
After completion, the
Sequencer stops in an idle state and waits on the next
START event.
4.2 Processing of ZPD Channels (ZPD Mode)
This is performed for all channels, which are enabled, and CZPn is set, and the
zero point is not yet detected.
In ZPD Mode, the
Movement Calculator is neither used, nor started. Instead of
the microstep result of the Movement Calculator, the value of CZC is used for
the addressing of the PWM Value RAM.
When entering the ZPD mode for a channel n (
CZPn was not set in the
previous pass),
ZIPn, ZAFn, CZCn and CZDn are initialized to zero, as the
ZPD mode for this channel now begins.
A local copy of the ZPD table index delay
CZDn for this channel is
decremented, if it is above zero.
If the current
CZDn delay has passed (CZDn has reached zero during this
START event cycle), the next ZPD table index has to be applied by
incrementing ZPD table index counter
CZCn of this channel. If the count of