44
TMC223 DATASHEET (V. 1.05 / March 7, 2011)
8.3 Using the device
Q: What is the meaning of the ‘Shaft’ bit?
A: The Shaft bit determines the rotating direction of the motor, i.e. clockwise or counter-clockwise
rotation.
Q: How to generate an interrupt when the target position is reached?
A: This is not possible. The device hasn’t any interrupt output at all. Just poll ActPos or Motion[2:0]
using an appropriate command.
Q: How can I ensure that I always get consistent data for ActPos and ESW?
A: There isn’t a single command to read both ActPos and ESW simultaneously. GetFullStatus1 will
read ESW whereas GetFullStatus2 will read ActPos. Thus it is not possible to read consistent values
as long as a motion is in progress.
Q: How to specify a second target position to go to immediately after a first target position has
been reached?
A: This is possible using the RunInit command. Note, that after the second target position has been
reached the internal position counter ActPos is reset to zero.
Q: Is it possible to change Vmax on-the-fly?
A: Yes, it is, if the new velocity is in the same group as the old one (see Vmax Parameters). Otherwise
correct positioning is not ensured anymore. Vmax values are divided into four groups:
•
•
•
•
group A: Vmax index = 0
group B: Vmax index = 1, 2, 3, 4 ,5 or 6
group C: Vmax index = 7, 8, 9, 10 ,11 or 12
group D: Vmax index = 13, 14 or 15
Q: Is it possible to change the stepping mode on-the-fly?
A: Yes, it is possible and it has immediate effect on the current motion.
Q: How to operate in continuous velocity mode rather than positioning (ramp) mode?
A: There is no velocity mode. The device was designed primarily for positioning tasks so for each
motion there has to be specified a target position by the respective command. However, velocity mode
can be emulated by repeating the following two commands again and again:
•
•
Read ActPos using GetFullStatus2 command
Set lower 16 bits of [ActPos+32767] as the next target position using SetPosition command
For real continuous motion this sequence has to be repeated before the current target position has
been reached.
Q: Which units, formats and ranges does position information have?
A: All 16-bit position data fields in commands and responses are coded in two’s complement format
with bit 0 representing 1/16 micro-steps. Hence a position range of –32768…+32767 in units of 1/16
micro-steps is covered regardless of the selected stepping mode (1/2, 1/4, 1/8 or 1/16 micro-stepping).
The difference between the stepping modes is the resolution resp. the position of the LSB in the 16-bit
position data field: it’s bit 0 for 1/16, bit 1 for 1/8, bit 2 for 1/4 and bit 3 for 1/2 micro-stepping. The
position range can be regarded as a circle since position –32768 is just 1/16 micro-step away from
position +32767. The device will always take the shortest way from the current to the target position,
i.e., if the current position is +32767 and the target position is –32768 just 1/16 micro-step will be
executed. 65535 1/16 micro-steps in the opposite direction can be achieved for example by two
consecutive SetPosition commands with target positions 0 and –32768.
The 11-bit secure position data field can be treated as the upper 11 MSBs of the 16-bit position data
fields described above with the 5 LSBs hardwired to zero. Hence it covers the same position range with
a reduced resolution: The position range is –1024…+1023 in units of two full-steps.
Copyright © 2007-2011 TRINAMIC Motion Control GmbH & Co. KG