User manual
TMCM-1161 TMCL Firmware V1.19 Manual (Rev. 1.04 / 2012-NOV-19) 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 ................................................................. 8
2.2 Using TMCL Direct Mode .................................................................................................................................... 9
2.2.1 Important Motor Settings ......................................................................................................................... 10
2.3 Testing with a Simple TMCL Program ......................................................................................................... 11
3 TMCL and the TMCL-IDE: Introduction ................................................................................................................. 12
3.1 Binary Command Format ................................................................................................................................ 12
3.1.1 Checksum Calculation ................................................................................................................................ 13
3.2 Reply Format ....................................................................................................................................................... 13
3.2.1 Status Codes ................................................................................................................................................. 14
3.3 Standalone Applications .................................................................................................................................. 14
3.4 TMCL Command Overview .............................................................................................................................. 15
3.4.1 TMCL Commands ......................................................................................................................................... 15
3.4.2 Commands Listed According to Subject Area .................................................................................... 16
3.5 Commands ........................................................................................................................................................... 20
3.5.1 ROR (rotate right) ........................................................................................................................................ 20
3.5.2 ROL (rotate left) ........................................................................................................................................... 21
3.5.3 MST (motor stop)......................................................................................................................................... 22
3.5.4 MVP (move to position) ............................................................................................................................ 23
3.5.5 SAP (set axis parameter) ........................................................................................................................... 24
3.5.6 GAP (get axis parameter) .......................................................................................................................... 25
3.5.7 STAP (store axis parameter) ..................................................................................................................... 26
3.5.8 RSAP (restore axis parameter) ................................................................................................................. 27
3.5.9 SGP (set global parameter) ...................................................................................................................... 28
3.5.10 GGP (get global parameter)...................................................................................................................... 29
3.5.11 STGP (store global parameter) ................................................................................................................ 30
3.5.12 RSGP (restore global parameter) ............................................................................................................ 31
3.5.13 RFS (reference search) ................................................................................................................................ 32
3.5.14 SIO (set input / output) ............................................................................................................................. 33
3.5.15 GIO (get input /output) ............................................................................................................................. 35
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 Customer specific TMCL command extension (UF0… UF7/user function) .................................... 49
3.5.29 Request target position reached event ................................................................................................ 49
3.5.30 TMCL Control Functions ............................................................................................................................. 50
4 Axis parameters .......................................................................................................................................................... 52
4.1 stallGuard2 ........................................................................................................................................................... 59
4.2 coolStep Related Axis Parameters ................................................................................................................ 59
5 Global parameters ...................................................................................................................................................... 61
5.1 Bank 0 ................................................................................................................................................................... 61
5.2 Bank 1 ................................................................................................................................................................... 62
5.3 Bank 2 ................................................................................................................................................................... 63
5.4 Bank 3 ................................................................................................................................................................... 64