TMCM-310 TMCL™ Firmware Manual (V1.02/2011-JAN-11) 2
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
Table of contents
1Life support policy ....................................................................................................................................................... 4
2Features........................................................................................................................................................................... 5
3Order codes.................................................................................................................................................................... 6
4Overview ......................................................................................................................................................................... 7
5Putting the TMCM-310 into operation .................................................................................................................... 8
5.1 Starting up............................................................................................................................................................. 8
5.2 Testing with a simple TMCLTM program ......................................................................................................11
5.3 Operating the module in direct mode ........................................................................................................12
6TMCL™ and TMCL-IDE................................................................................................................................................13
6.1 Binary command format..................................................................................................................................13
6.2 Reply format........................................................................................................................................................14
6.2.1 Status codes..................................................................................................................................................15
6.3 Stand-alone applications .................................................................................................................................15
6.4 TMCL™ command overview ...........................................................................................................................15
6.4.1 Motion commands ......................................................................................................................................15
6.4.2 Parameter commands ................................................................................................................................16
6.4.3 I/O port commands.....................................................................................................................................16
6.4.4 Control commands......................................................................................................................................16
6.4.5 Calculation commands...............................................................................................................................17
6.5 TMCL™ List of commands...............................................................................................................................18
6.6 The ASCII interface ...........................................................................................................................................20
6.6.1 Format of the command line...................................................................................................................20
6.6.2 Format of a reply.........................................................................................................................................20
6.6.3 Commands that can be used in ASCII mode .....................................................................................20
6.6.4 Configuring the ASCII interface ..............................................................................................................20
6.7 Commands...........................................................................................................................................................22
6.7.1 ROR (rotate right).........................................................................................................................................22
6.7.2 ROL (rotate left)............................................................................................................................................23
6.7.3 MST (motor stop).........................................................................................................................................24
6.7.4 MVP (move to position).............................................................................................................................25
6.7.5 SAP (set axis parameter) ...........................................................................................................................27
6.7.6 GAP (get axis parameter)...........................................................................................................................31
6.7.7 STAP (store axis parameter) .....................................................................................................................35
6.7.8 RSAP (restore axis parameter) .................................................................................................................38
6.7.9 SGP (set global parameter).......................................................................................................................41
6.7.10 GGP (get global parameter)......................................................................................................................44
6.7.11 STGP (store global parameter).................................................................................................................47
6.7.12 RSGP (restore global parameter).............................................................................................................49
6.7.13 RFS (reference search)................................................................................................................................51
6.7.14 SIO (set output) ...........................................................................................................................................52
6.7.15 GIO (get input/output)..............................................................................................................................53
6.7.16 CALC (calculate) ............................................................................................................................................55
6.7.17 COMP (compare)...........................................................................................................................................56
6.7.18 JC (jump conditional)..................................................................................................................................57
6.7.19 JA (jump always)..........................................................................................................................................58
6.7.20 CSUB (call subroutine)................................................................................................................................59
6.7.21 RSUB (return from subroutine)................................................................................................................60
6.7.22 WAIT (wait for an event to occur) .........................................................................................................61
6.7.23 STOP (stop TMCL™ program execution) ...............................................................................................62
6.7.24 SAC –SPI Bus Access.................................................................................................................................63
6.7.25 SCO (set coordinate) ...................................................................................................................................64
6.7.26 GCO (get coordinate) ..................................................................................................................................65
6.7.27 CCO (capture coordinate)...........................................................................................................................66
6.7.28 CALCX (calculate using the X register) ..................................................................................................67
6.7.29 AAP (accumulator to axis parameter) ....................................................................................................68
6.7.30 AGP (accumulator to global parameter) ...............................................................................................71