User Manual

TMCM-102 Manual (V1.01 / 7 November 2007) 15
Copyright © 2006, TRINAMIC Motion Control GmbH & Co. KG
5.8 StallGuard™ - Sensorless Motor Stall Detection
The integrated StallGuard™ feature makes it possible to detect if the mechanical load on a stepper
motor is too high or if the traveler has been obstructed. The load value can be read using a TMCL
command or the module can be programmed so that the motor will be stopped automatically when
it has been obstructed or the load has been to high.
StallGuard can also be used for finding the reference position without the need for a reference switch:
Just activate StallGuard and then let the traveler run against a mechanical obstacle that is placed at
the end of the way. When the motor has stopped it is definitely at the end of its way, and this point
can be used as the reference position.
To use StallGuard in an actual application, some manual tests should be done first, because the
StallGuard level depends upon the motor velocities and on the occurrence of resonances. When
switching on StallGuard, the motor operation mode is changed and microstep resolution may be
worse. Thus, StallGuard should be switched off when not in use.
Mixed decay should be switched off when StallGuard operational in order to get usable results.
Value Description
-7..-1
Motor stops when StallGuard value is reached and position is set zero
(useful for reference run).
0 StallGuard function is deactivated (default)
1..7
Motor stops when StallGuard value is reached and position is not set zero.
Table 5.4: StallGuard parameter SAP 205
To activate the StallGuard feature use the TMCL-command SAP 205 and set the StallGuard threshold
value according to Table 5.4. The actual load value is given by GAP 206. The TMCL IDE has some tools
which let you try out and adjust the StallGuard function in an easy way. They can be found at
“StallGuard” in the “Setup”-menu and are described in the following chapters.
5.8.1 StallGuard adjusting tool
The StallGuard adjusting tool helps to find the necessary motor parameters when StallGuard is to be
used. This function can only be used when a module is connected that features StallGuard. This is
checked when the StallGuard adjusting tool is selected in the “Setup”
menu. After this has been successfully checked the StallGuard adjusting
tool is displayed.
First, select the axis that is to be used in the “Motor” area.
Now you can enter a velocity and an acceleration value in the “Drive” area
and then click “Rotate Left” or “Rotate Right”. Clicking one of these button
will send the necessary commands to the module so that the motor starts
running. The red bar in the “StallGuard” area on the right side of the
windows displays the actual load value. Use the slider to set the
StallGuard threshold value. If the load value reaches this value the motor
stops. Clicking the “Stop” button also stops the motor.
All commands necessary to set the values entered in this dialogue are
displayed in the “Commands” area at the bottom of the window. There,
they can be selected, copied and pasted into the TMCL editor.
Figure 5.5: StallGuard adjusting tool
5.8.2 StallGuard profiler
The StallGuard profiler is a utility that helps you find the best parameters for using stall detection. It
scans through given velocities and shows which velocities are the best ones. Similar to the StallGuard
adjusting tool it can only be used together with a module that supports StallGuard. This is checked