
TMCM-351 TMCL Firmware V4.45 Manual (Rev. 1.06 / 2014-MAY-16) 2
www.trinamic.com
Table of Contents
1Features........................................................................................................................................................................... 4
2Putting the TMCM-351 into Operation.................................................................................................................... 5
2.1 Starting up............................................................................................................................................................. 5
2.2 Testing with a Simple TMCL Program ........................................................................................................... 8
2.2.1 Testing without Encoder ............................................................................................................................. 8
2.2.2 Testing with Encoder ................................................................................................................................... 9
2.3 Operating the Module in Direct Mode.........................................................................................................10
3Overview .......................................................................................................................................................................11
4TMCL and TMCL-IDE....................................................................................................................................................11
4.1 Binary command format..................................................................................................................................11
4.1.1 Checksum Calculation.................................................................................................................................12
4.2 Reply Format.......................................................................................................................................................12
4.2.1 Status Codes .................................................................................................................................................13
4.3 Standalone Applications ..................................................................................................................................13
4.4 TMCL Command Overview ..............................................................................................................................14
4.4.1 TMCL Commands .........................................................................................................................................14
4.4.2 Commands Listed According to Subject Area.....................................................................................15
4.5 The ASCII Interface...........................................................................................................................................20
4.5.1 Command Line Format ..............................................................................................................................20
4.5.2 Format of a Reply........................................................................................................................................20
4.5.3 Commands Used in ASCII Mode.............................................................................................................20
4.5.4 Configuring the ASCII Interface..............................................................................................................21
4.6 Commands...........................................................................................................................................................22
4.6.1 ROR (rotate right).......................................................................................................................................22
4.6.2 ROL (rotate left)............................................................................................................................................23
4.6.3 MST (motor stop) .......................................................................................................................................24
4.6.4 MVP (move to position).............................................................................................................................25
4.6.5 SAP (set axis parameter) ...........................................................................................................................27
4.6.6 GAP (get axis parameter)...........................................................................................................................28
4.6.7 STAP (store axis parameter) .....................................................................................................................29
4.6.8 RSAP (restore axis parameter) .................................................................................................................30
4.6.9 SGP (set global parameter).......................................................................................................................31
4.6.10 GGP (get global parameter)......................................................................................................................32
4.6.11 STGP (store global parameter).................................................................................................................33
4.6.12 RSGP (restore global parameter).............................................................................................................34
4.6.13 RFS (reference search)................................................................................................................................35
4.6.14 SIO (set output) ...........................................................................................................................................36
4.6.15 GIO (get input/output) ...............................................................................................................................38
4.6.16 CALC (calculate) ............................................................................................................................................41
4.6.17 COMP (compare)...........................................................................................................................................42
4.6.18 JC (jump conditional)..................................................................................................................................43
4.6.19 JA (jump always)..........................................................................................................................................44
4.6.20 CSUB (call subroutine)................................................................................................................................45
4.6.21 RSUB (return from subroutine)................................................................................................................46
4.6.22 WAIT (wait for an event to occur) .........................................................................................................47
4.6.23 STOP (stop TMCL program execution) ...................................................................................................48
4.6.24 SAC (SPI bus access)...................................................................................................................................49
4.6.25 SCO (set coordinate) ...................................................................................................................................50
4.6.26 GCO (get coordinate) ..................................................................................................................................51
4.6.27 CCO (capture coordinate)...........................................................................................................................52
4.6.28 ACO (accu to coordinate)...........................................................................................................................53
4.6.29 CALCX (calculate using the X register) ..................................................................................................54
4.6.30 AAP (accumulator to axis parameter) ....................................................................................................55
4.6.31 AGP (accumulator to global parameter) ...............................................................................................56
4.6.32 CLE (clear error flags) .................................................................................................................................57
4.6.33 VECT (set interrupt vector)........................................................................................................................58