TMC4330A Datasheet | Document Revision 1.01 • 2017-JAN-12
48/166
In some cases, it is useful to switch from external to internal ramp generation during
motion.
Switching from
External to
Internal Control
TMC4330A supports a smooth transfer from direct external control to an internal ramp.
The only parameter you need to know and apply is the current velocity when the
switching occurs. In more detail, this means that when the external control is switched
off, VSTART takes over the definition of the actual velocity value. The ramp direction
is then selected automatically. The time step of the last internal step is also taken into
account in order to provide a smooth transition from external to internal ramp control.
In order to select automatic switching from external to internal control, do
as follows:
PRECONDITION (EXTERNAL DIRECT CONTROL IS ACTIVE):
Action:
Set sdin_mode ≠ b’00 (GENERAL_CONF register 0x00).
Set sd_indirect_control = 0 (GENERAL_CONF register 0x00).
Set ASTART = 0 (register 0x2A).
PROCEED WITH:
Action:
Set automatic_direct_sdin_switch_off = 1 (GENERAL_CONF register 0x00) once
before switching to internal control.
Continually adapt VSTART register 0x25 according to the actual velocity of the
TMC4330A that must be calculated in the µC.
If switching must be prompted, set sdin_mode = b’00.
Result:
The internal ramp velocity is started with the value of VSTART, and the direction is
set automatically on the basis of the external steps that have occurred before.
Smooth
Switching for
S-shaped Ramps
In order to also support a smooth S-shaped ramp transition - when the external step
control is switched off - the starting acceleration value can also be set separately at
ASTART register 0x2A.
i
In contrast to the automatic direction assignment, the sign of ASTART must be
set manually.
In order to select automatic switching from external to internal control with
a starting acceleration value, do as follows:
PRECONDITION (EXTERNAL DIRECT CONTROL IS ACTIVE):
Action:
Set sdin_mode ≠ b’00 (GENERAL_CONF register 0x00).
Set sd_indirect_control = 0 (GENERAL_CONF register 0x00).
PROCEED WITH:
Action:
Set automatic_direct_sdin_switch_off = 1 once before switching to internal control.
Continually adapt VSTART register 0x25 according to the actual velocity of the
TMC4330A — that must be calculated in the µC.
Continually adapt ASTART according to the actual acceleration (unsigned value) of
the TMC4330A — that must be calculated in the µC.
Continually set ASTART(31) = 0 or 1 according to the acceleration direction.
If switching must be prompted, set sdin_mode = b’00.
Result:
The internal ramp velocity is started with the value of VSTART, and the direction is
set automatically on the basis of the external steps that have occurred before. The
internal acceleration value is set to:
+ASTART
–ASTART
if ASTART(31) = 0
if ASTART(31) = 1.
or
© 2015 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany — Terms of delivery and rights
to technical change reserved. Download newest version at: www.trinamic.com .
Read entire documentation; especially the “Supplemental Directives” on page 160.
MAIN MANUAL