Product specifications

R01AN0168ED0101 Rev. 01.01 31
Application Note
Chapter 6 Performing Movements
(2) Value Integer
For position values, the value integer consists of the macrosteps and the
microsteps. Depending on the precision setting of a channel (
CCPn), either 9
or 7 bits are reserved for the microsteps, and the remaining bits up to bit 23 are
used for the macrosteps.
(3) Value Binary Fraction
This part represents the fractional part of the value. Its binary step is
1
/
256
of
the value integer.
The binary fraction is used for internal calculations only. For user software, the
following rules are important:
1. When setting the parameter
PMPn,
all bits of the binary fraction have to be set.
2. When setting all other parameters or variables by software,
all bits of the binary fraction have to be cleared.
Caution If rule (1) is not followed, it may happen that because of permanent deviation
of the algorithm, a target position can never be reached.
The deviation of the algorithm of the Movement Calculator is less than 1
microstep.
When moving “upwards”, the algorithm may stop less than 1 microstep
below the target position, which however results in one count too less for
the microstep, but an added fractional value. Like this, the position
reached interrupt (
IRQ_REACHEDn) can never be generated, because
this interrupt is based on a comparison on
Value Integer level.
When moving “downwards”, the algorithm has no deviation. Therefore
the target position can be reached in any case, independently of any
settings of the binary fraction.
6.1.2 Parameter Description
(1) Target Position PMPn
Represents the requested target position of the motor, given in macrosteps
(full turns) and microsteps (angle). The target position can be a negative
number.
Unit: Absolute Position
Example Setting: 0x001234FF
(for low precision setting, sine/cosine table) +36 turns, 146°
(2) Damping Factor PDFn
Represents the inertia of the algorithm. The value given here is not a 25-bit
number, but only a 3-bit number. It is the exponent 2
PDF
, which divides the
theoretical maximum speed required to reach the target position within only
one algorithm pass.
Unit: Factor
•Example Setting: 0x6
(chosen speed on every algorithm pass)
1
/
64
of maximum speed