User manual
PDx-113-57/60-SE / TMCM-113-57/60-SE Firmware Manual (V1.10 / 2009-OCT-28) 89
Copyright © 2009, TRINAMIC Motion Control GmbH & Co. KG
9.3 Stall detection
The module is equipped with TMC249 motor driver chips. These chips feature load measurement that can be
used for stall detection. The stallGuard
TM
function effects that the motor will be stopped when the load gets
too high. It is controlled by axis parameter #205. If this parameter is set to a value between 1 and 7 the
stall detection will be activated. Setting it to 0 means that stall detection is turned off. A greater value
means a higher threshold. This also depends on the motor and on the velocity. There is no stall detection
while the motor is being accelerated or decelerated.
Stall detection can also be used for finding the reference point. You can do this by using the following
TMCL
TM
code:
SAP 205, 0, 5 //Turn on Stall Detection (use other threshold if needed)
ROL 0, 500 //Let the motor run (or use ROR or other velocity)
Loop: GAP 3, 0
COMP 0
JC NE, Loop //Wait until the motor has stopped
SAP 1, 0, 0 //Set this position as the zero position
Do not use RFS in this case.
Mixed decay should be switched off when stallGuard™ operational in order to get usable results.
9.4 Fixing microstep errors
Due to the zero crossing problem of the TMC249 stepper motor drivers, microstep errors may occur with
some motors as the minimum motor current that can be reached is slightly higher than zero (depending on
the inductivity, resistance and supply voltage of the motor).
This can be solved by setting the mixed decay threshold parameter (axis parameter 203) to the value -1. This
switches on mixed decay permanently, in every part of the microstepping waveform. Now the minimum
reachable motor current is always near zero which gives better microstepping results.
A further optimization is possible by adapting the motor current shape and the zero offset of the wave. (For
further information about TMCL-IDE please refer to the TMCL
TM
reference and programming manual.)
Use SAP 203, <motor number>, -1 to turn on this feature.
9.5 Using the RS485 interface
9.5.1 Using RS485 with converter
With most RS485 converters that can be attached to the COM port of a PC the data direction is controlled by
the RTS pin of the COM port. Please note that this will only work with Windows 2000, Windows XP,
Windows NT4 or Vista, not with Windows 95, Windows 98 or Windows ME (due to a bug in these operating
systems). Another problem is that Windows 2000/XP/NT4 switches the direction back to receive too late. To
overcome this problem, set the telegram pause time (global parameter #75) of the module to 15 (or more if
needed) by issuing an SGP 75, 0, 15 command in direct mode. The parameter will automatically be stored in
the configuration EEPROM.
9.5.2 Using RS485 with USB-2-X interface converter
Another possibility offers the TRINAMIC USB-2-X device. It is an interface converter that is equipped with a
CAN interface, an IIC interface, a LIN interface, an SPI interface and an RS485 interface. It is connected to the
PC via an USB interface. The following data apply for RS485:
half duplex communication mode
industry standard 75179 transceiver
2400, 9600, and 19200 bps supported
Note: For RS232 set the telegram pause time to zero for maximum data throughput.