TMCM-3314 TMCL
™
Firmware Manual • Firmware Version V1.11 | Document Revision V1.10 • 2019-JAN-25
127 / 144
6.2
Using Encoders
With the TMCM-3314 it is also possible to use encoders. The TMCM-3314 can work as an open-loop system
as well as a true servo-like closed-loop system. In open-loop mode encoders can be used just to check
if the motor really reaches its target positions and thus can follow the magnetic field and the position
counter. In closed-loop mode the encoder is used for position feed back with regulation of the position, so
that it will work like a servo.
Consider the following things for using encoders with the TMCM-3314:
• 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.
• We recommend executing the reference search in open-loop mode and switch to closed-loop mode
after the reference search has finished successfully.
• The motor can also be stopped automatically when it cannot follow anymore (due to overload or
obstruction). Axis parameter #212 controls this function.
6.3
Closed-Loop Operation
Together with an external ABN encoder it is possible to operate each axis of the TMCM-3314 as a closed-
loop stepper system. Before enabling this feature, some parameters have to be set. The following example
TMCL program shows how to do this.
1
// Closed loop operation with 10000 cpr optical encoder and 1.8 ° Motor
3
// General Settings :
SAP 6, 0, 85
// set current to 1A ( RMS )
5
SAP 7, 0, 10
// set standby current
7
// Encoder Resolution Setting :
SAP 210 , 0, 10000
// 10000 counts per round
9
// Closed Loop Field Weakening Settings
11
SAP 108 , 0, 300000
// gamma Vmin
SAP 109 , 0, 1600000
// gamma Vmax
13
SAP 110 , 0, 255
// set CL maximum gamma
15
// Closed Loop Current Setting :
SAP 111 , 0, 255
// set CL beta ( default 255) => 90°
17
SAP 113 , 0, 50
// set CL current minimum
SAP 114 , 0, 255
// set CL current maximum
19
SAP 126 , 0, 255
// Start of Current Increase in CL Mode [0..255]
SAP 125 , 0, 255
// set max . correction tolerance
21
SAP 134 , 0, 100
SAP 120 , 0, 1000
// set CL upscale delay
23
SAP 121 , 0, 10000
// set CL downscale delay
SAP 115 , 0, 3000
// set CL correction velocity P
©2019 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at