User manual
PD-1160 TMCL Firmware V1.19 Manual (Rev. 1.01 / 2012-JUL-30) 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 Start the TMCL-IDE Software Development Environment ................................................................. 9
2.2 Using TMCL Direct Mode .................................................................................................................................. 10
2.2.1 Important Motor Settings ......................................................................................................................... 11
2.3 Testing with a Simple TMCL Program ......................................................................................................... 12
3 TMCL and the TMCL-IDE: Introduction ................................................................................................................. 13
3.1 Binary Command Format ................................................................................................................................ 13
3.1.1 Checksum Calculation ................................................................................................................................ 14
3.2 Reply Format ....................................................................................................................................................... 14
3.2.1 Status Codes ................................................................................................................................................. 15
3.3 Standalone Applications .................................................................................................................................. 15
3.4 TMCL Command Overview .............................................................................................................................. 16
3.4.1 TMCL Commands ......................................................................................................................................... 16
3.4.2 Commands Listed According to Subject Area .................................................................................... 17
3.5 The ASCII Interface ........................................................................................................................................... 21
3.5.1 Format of the Command Line ................................................................................................................. 21
3.5.2 Format of a Reply ....................................................................................................................................... 21
3.5.3 Configuring the ASCII Interface ............................................................................................................. 22
3.6 Commands ........................................................................................................................................................... 23
3.6.1 ROR (rotate right) ....................................................................................................................................... 23
3.6.2 ROL (rotate left) ........................................................................................................................................... 24
3.6.3 MST (motor stop)......................................................................................................................................... 25
3.6.4 MVP (move to position) ............................................................................................................................ 26
3.6.5 SAP (set axis parameter) ........................................................................................................................... 28
3.6.6 GAP (get axis parameter) .......................................................................................................................... 29
3.6.7 STAP (store axis parameter) ..................................................................................................................... 30
3.6.8 RSAP (restore axis parameter) ................................................................................................................. 31
3.6.9 SGP (set global parameter) ...................................................................................................................... 32
3.6.10 GGP (get global parameter)...................................................................................................................... 33
3.6.11 STGP (store global parameter) ................................................................................................................ 34
3.6.12 RSGP (restore global parameter) ............................................................................................................ 35
3.6.13 RFS (reference search) ................................................................................................................................ 36
3.6.14 SIO (set output) ........................................................................................................................................... 37
3.6.15 GIO (get input/output) ............................................................................................................................... 39
3.6.16 CALC (calculate) ............................................................................................................................................ 42
3.6.17 COMP (compare)........................................................................................................................................... 43
3.6.18 JC (jump conditional) ................................................................................................................................. 44
3.6.19 JA (jump always) ......................................................................................................................................... 45
3.6.20 CSUB (call subroutine) ............................................................................................................................... 46
3.6.21 RSUB (return from subroutine) ................................................................................................................ 47
3.6.22 WAIT (wait for an event to occur) ......................................................................................................... 48
3.6.23 STOP (stop TMCL program execution) ................................................................................................... 49
3.6.24 SCO (set coordinate) ................................................................................................................................... 50
3.6.25 GCO (get coordinate) .................................................................................................................................. 51
3.6.26 CCO (capture coordinate) .......................................................................................................................... 52
3.6.27 ACO (accu to coordinate) .......................................................................................................................... 53
3.6.28 CALCX (calculate using the X register) .................................................................................................. 54
3.6.29 AAP (accumulator to axis parameter) .................................................................................................... 55
3.6.30 AGP (accumulator to global parameter) ............................................................................................... 56
3.6.31 CLE (clear error flags) ................................................................................................................................. 57
3.6.32 VECT (set interrupt vector) ........................................................................................................................ 58
3.6.33 EI (enable interrupt) ................................................................................................................................... 59
3.6.34 DI (disable interrupt) .................................................................................................................................. 60
3.6.35 RETI (return from interrupt) ..................................................................................................................... 61