TMCM-1181 TMCL Firmware V1.26 Manual (Rev. 0.90 / 2013-APR-15) 2
www.trinamic.com
Table of Contents
1 Features ........................................................................................................................................................................... 4
2 Putting the Module into Operation ........................................................................................................................ 6
2.1 Basic Set-Up .......................................................................................................................................................... 6
2.1.1 Connecting the module ............................................................................................................................... 6
2.1.2 Start the TMCL-IDE Software Development Environment ................................................................. 7
2.2 Using TMCL Direct Mode .................................................................................................................................... 8
2.2.1 Important Motor Settings ........................................................................................................................... 9
2.3 Testing with a Simple TMCL Program ......................................................................................................... 10
3 TMCL and the TMCL-IDE: Introduction ................................................................................................................. 11
3.1 Binary Command Format ................................................................................................................................ 11
3.1.1 Checksum Calculation ................................................................................................................................ 12
3.2 Reply Format ....................................................................................................................................................... 12
3.2.1 Status Codes ................................................................................................................................................. 13
3.3 Standalone Applications .................................................................................................................................. 13
3.4 TMCL Command Overview .............................................................................................................................. 14
3.4.1 TMCL Commands ......................................................................................................................................... 14
3.4.2 Commands Listed According to Subject Area .................................................................................... 15
3.5 Commands ........................................................................................................................................................... 19
3.5.1 ROR (rotate right) ........................................................................................................................................ 19
3.5.2 ROL (rotate left) ........................................................................................................................................... 20
3.5.3 MST (motor stop)......................................................................................................................................... 21
3.5.4 MVP (move to position) ............................................................................................................................ 22
3.5.5 SAP (set axis parameter) ........................................................................................................................... 23
3.5.6 GAP (get axis parameter) .......................................................................................................................... 24
3.5.7 STAP (store axis parameter) ..................................................................................................................... 25
3.5.8 RSAP (restore axis parameter) ................................................................................................................. 26
3.5.9 SGP (set global parameter) ...................................................................................................................... 27
3.5.10 GGP (get global parameter)...................................................................................................................... 28
3.5.11 STGP (store global parameter) ................................................................................................................ 29
3.5.12 RSGP (restore global parameter) ............................................................................................................ 30
3.5.13 RFS (reference search) ................................................................................................................................ 31
3.5.14 SIO (set input / output) ............................................................................................................................. 32
3.5.15 GIO (get input /output) ............................................................................................................................. 34
3.5.16 CALC (calculate) ............................................................................................................................................ 37
3.5.17 COMP (compare)........................................................................................................................................... 38
3.5.18 JC (jump conditional) ................................................................................................................................. 39
3.5.19 JA (jump always) ......................................................................................................................................... 40
3.5.20 CSUB (call subroutine) ............................................................................................................................... 41
3.5.21 RSUB (return from subroutine) ................................................................................................................ 42
3.5.22 WAIT (wait for an event to occur) ......................................................................................................... 43
3.5.23 STOP (stop TMCL program execution) ................................................................................................... 44
3.5.24 CALCX (calculate using the X register) .................................................................................................. 45
3.5.25 AAP (accumulator to axis parameter) .................................................................................................... 46
3.5.26 AGP (accumulator to global parameter) ............................................................................................... 47
3.5.27 CLE (clear error flags) ................................................................................................................................. 48
3.5.28 VECT (set interrupt vector) ........................................................................................................................ 49
3.5.29 EI (enable interrupt) ................................................................................................................................... 50
3.5.30 DI (disable interrupt) .................................................................................................................................. 51
3.5.31 RETI (return from interrupt) ..................................................................................................................... 52
3.5.32 Customer specific TMCL command extension (UF0… UF7/user function) .................................... 53
3.5.33 Request target position reached event ................................................................................................ 53
3.5.34 TMCL Control Functions ............................................................................................................................. 54
4 Axis parameters .......................................................................................................................................................... 56
4.1 stallGuard2 ........................................................................................................................................................... 63
4.2 coolStep Related Axis Parameters ................................................................................................................ 63
5 Global parameters ...................................................................................................................................................... 65