TMCM-6212 TMCL
™
Firmware Manual • Firmware Version V1.11 | Document Revision V1.07 • 2019-JAN-25
127 / 140
6.2
Using Encoders
With the TMCM-6212 it is also possible to use encoders. Please note that the TMCM-6212 is an open-loop
system, and hence encoders can only be used to check if the motor has really reached its target position
or really follows the position counter. With the TMCM-6212 the encoder cannot be used for a servo-like
closed-loop operation (but there are a number of other Trinamic modules which can do real closed-loop
operation).
Consider the following things for using encoders with the TMCM-6212:
• Set the motor full step resolution using parameter #202 (for 1.8° motors this is 200 which is also the
default value of this parameter).
• Set the encoder resolution (as encoder counts per round) using axis parameter #210.
• When parameters #202 and #210 are set to the right values the module will automatically convert
the encoder resolution to the motor microstep resolution so that the encoder postion is the same as
the motor position.
• The encoder position can be read using axis parameter #209. This parameter is also writable, e.g. for
setting a new origin. After a reference search this parameter is also automatically set to 0.
• The motor can also be stopped automatically when it cannot follow anymore (due to overload or
obstruction). Axis parameter #212 controls this function.
• Some special encoder functions (like clear when null channel has been found) can be controlled
using axis parameter #201.
6.3
StallGuard2
The module is equipped with motor driver chips that feature load measurement. This load measurement
can be used for stall detection. StallGuard2 delivers a sensorless load measurement of the motor as well
as a stall detection signal. The measured value changes linear with the load on the motor in a wide range
of load, velocity and current settings. At maximum motor load the StallGuard value goes to zero. This
corresponds to a load angle of 90° between the magnetic field of the stator and magnets in the rotor. This
also is the most energy efficient point of operation for the motor.
Stall detection means that the motor will be stopped automatically when the load gets too high. This
function is configured mainly using axis parameters #174 and #181.
Stall detection can for example be used for finding the reference point without the need for reference
switches. A short routine written in TMCL is needed to use StallGuard for reference searching.
©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at