User Manual
Table Of Contents
- 1 Features
- 2 First Steps with TMCL
- 3 TMCL and the TMCL-IDE — An Introduction
- 3.1 Binary Command Format
- 3.2 Reply Format
- 3.3 Standalone Applications
- 3.4 The ASCII Interface
- 3.5 TMCL Command Overview
- 3.6 TMCL Commands by Subject
- 3.7 Detailed TMCL Command Descriptions
- 3.7.1 ROR (Rotate Right)
- 3.7.2 ROL (Rotate Left)
- 3.7.3 MST (Motor Stop)
- 3.7.4 MVP (Move to Position)
- 3.7.5 SAP (Set Axis Parameter)
- 3.7.6 GAP (Get Axis Parameter)
- 3.7.7 STAP (Store Axis Parameter)
- 3.7.8 RSAP (Restore Axis Parameter)
- 3.7.9 SGP (Set Global Parameter)
- 3.7.10 GGP (Get Global Parameter)
- 3.7.11 STGP (Store Global Parameter)
- 3.7.12 RSGP (Restore Global Parameter)
- 3.7.13 RFS (Reference Search)
- 3.7.14 SIO (Set Output)
- 3.7.15 GIO (Get Input)
- 3.7.16 CALC (Calculate)
- 3.7.17 COMP (Compare)
- 3.7.18 JC (Jump conditional)
- 3.7.19 JA (Jump always)
- 3.7.20 CSUB (Call Subroutine)
- 3.7.21 RSUB (Return from Subroutine)
- 3.7.22 WAIT (Wait for an Event to occur)
- 3.7.23 STOP (Stop TMCL Program Execution – End of TMCL Program)
- 3.7.24 SCO (Set Coordinate)
- 3.7.25 GCO (Get Coordinate)
- 3.7.26 CCO (Capture Coordinate)
- 3.7.27 ACO (Accu to Coordinate)
- 3.7.28 CALCX (Calculate using the X Register)
- 3.7.29 AAP (Accu to Axis Parameter)
- 3.7.30 AGP (Accu to Global Parameter)
- 3.7.31 CLE (Clear Error Flags)
- 3.7.32 EI (Enable Interrupt)
- 3.7.33 DI (Disable Interrupt)
- 3.7.34 VECT (Define Interrupt Vector)
- 3.7.35 RETI (Return from Interrupt)
- 3.7.36 Customer specific Command Extensions (UF0…UF7 – User Functions)
- 3.7.37 Request Target Position reached Event
- 3.7.38 TMCL Control Commands
- 4 Axis Parameters
- 5 Global Parameters
- 6 Module Specific Hints
- 7 Hints and Tips
- 8 TMCL Programming Techniques and Structure
- 9 Figures Index
- 10 Tables Index
- 11 Supplemental Directives
- 12 Revision History

PD-1160 TMCL
™
Firmware Manual • Firmware Version V1.42 | Document Revision V1.06 • 2018-JAN-09
3 / 113
3.7.22 WAIT (Wait for an Event to occur) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.7.23 STOP (Stop TMCL Program Execution – End of TMCL Program) . . . . . . . . . . . . . . 54
3.7.24 SCO (Set Coordinate) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.7.25 GCO (Get Coordinate) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.7.26 CCO (Capture Coordinate) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
3.7.27 ACO (Accu to Coordinate) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.7.28 CALCX (Calculate using the X Register) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
3.7.29 AAP (Accu to Axis Parameter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.7.30 AGP (Accu to Global Parameter) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.7.31 CLE (Clear Error Flags) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.7.32 EI (Enable Interrupt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.7.33 DI (Disable Interrupt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.7.34 VECT (Define Interrupt Vector) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
3.7.35 RETI (Return from Interrupt) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
3.7.36 Customer specific Command Extensions (UF0. . . UF7 – User Functions) . . . . . . . . . 71
3.7.37 Request Target Position reached Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3.7.38 TMCL Control Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4 Axis Parameters 76
5 Global Parameters 86
5.1 Bank 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.2 Bank 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.3 Bank 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.4 Bank 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
6 Module Specific Hints 91
6.1 Velocity and Acceleration Calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.1.1 Velocity Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.1.2 Acceleration Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
6.1.3 How to choose Pulse Divisor and Ramp Divisor . . . . . . . . . . . . . . . . . . . . . . . 92
6.1.4 Conversion between PPS, RPM and RPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.2 The sensOstep™ Encoder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92
6.2.1 Matching Encoder Resolution and Motor Resolution . . . . . . . . . . . . . . . . . . . . 93
6.2.2 Special Encoder Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
6.3 External Encoders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
7 Hints and Tips 96
7.1 Reference Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
7.1.1 Mode 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.1.2 Mode 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.1.3 Mode 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
7.1.4 Mode 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
7.1.5 Mode 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
7.1.6 Mode 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.1.7 Mode 7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
7.1.8 Mode 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
7.2 stallGuard2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
7.3 coolStep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
©2018 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com