User manual
TMCM-1640 TMCL Firmware V2.00 Manual (Rev. 2.00 / 2012-JUL-31) 2
www.trinamic.com
Table of Contents
1 Features ........................................................................................................................................................................... 4
2 Overview ......................................................................................................................................................................... 5
3 Putting the TMCM-1640 into Operation .................................................................................................................. 6
3.1 Starting up ............................................................................................................................................................. 6
3.2 Operating the Module in Direct Mode ........................................................................................................... 9
4 TMCL™ ........................................................................................................................................................................... 10
4.1 Binary Command Format ................................................................................................................................ 10
4.2 Reply Format ....................................................................................................................................................... 11
4.2.1 Status Codes ................................................................................................................................................. 11
4.3 Standalone Applications .................................................................................................................................. 12
4.4 Testing with a Simple TMCL Program ......................................................................................................... 12
4.5 TMCL Command Overview .............................................................................................................................. 13
4.5.1 Motion Commands ...................................................................................................................................... 13
4.5.2 Parameter Commands ................................................................................................................................ 13
4.5.3 Control Commands ..................................................................................................................................... 13
4.5.4 I/O Port Commands .................................................................................................................................... 13
4.5.5 Calculation Commands .............................................................................................................................. 14
4.6 Commands ........................................................................................................................................................... 15
4.6.1 ROR (rotate right)......................................................................................................................................... 15
4.6.2 ROL (rotate left) ............................................................................................................................................ 16
4.6.3 MST (motor stop) ......................................................................................................................................... 17
4.6.4 MVP (move to position) ............................................................................................................................. 18
4.6.5 SAP (set axis parameter) ........................................................................................................................... 19
4.6.6 GAP (get axis parameter) ........................................................................................................................... 20
4.6.7 STAP (store axis parameter) ..................................................................................................................... 21
4.6.8 RSAP (restore axis parameter) ................................................................................................................. 22
4.6.9 SGP (set global parameter) ....................................................................................................................... 23
4.6.10 GGP (get global parameter) ...................................................................................................................... 24
4.6.11 STGP (store global parameter) ................................................................................................................. 24
4.6.12 RSGP (restore global parameter) ............................................................................................................. 25
4.6.13 SIO (set output) and GIO (get input / output) ................................................................................... 26
4.6.14 CALC (calculate) ............................................................................................................................................ 28
4.6.15 COMP (compare) ........................................................................................................................................... 29
4.6.16 JC (jump conditional).................................................................................................................................. 30
4.6.17 JA (jump always).......................................................................................................................................... 31
4.6.18 CSUB (call subroutine) and RSUB (return from subroutine) ........................................................... 32
4.6.19 WAIT (wait for an event to occur) ......................................................................................................... 33
4.6.20 STOP (stop TMCL program execution) ................................................................................................... 34
4.6.21 CALCX (calculate using the X register) .................................................................................................. 35
4.6.22 AAP (accumulator to axis parameter) .................................................................................................... 36
4.6.23 AGP (accumulator to global parameter) ............................................................................................... 37
4.6.24 Customer Specific TMCL Command Extension (user functions 0… 7) ........................................... 37
4.6.25 Command 136 - Get Firmware Version ................................................................................................. 38
5 Axis Parameter Overview (SAP, GAP, STAP, RSAP, AAP) ................................................................................. 39
5.1 Axis Parameter Sorted by Functionality ...................................................................................................... 43
6 Global Parameter Overview (SGP, GGP, STGP, RSGP) ....................................................................................... 47
6.1 Bank 0 ................................................................................................................................................................... 47
6.2 Bank 2 ................................................................................................................................................................... 48
7 Motor Regulation ........................................................................................................................................................ 49
7.1 Structure of the Cascaded Motor Regulation Modes............................................................................... 49
7.2 Current Regulation ............................................................................................................................................ 50
7.3 Velocity Regulation ........................................................................................................................................... 51
7.4 Velocity Ramp Generator ................................................................................................................................. 52
7.5 Position Regulation ........................................................................................................................................... 52
8 Temperature Calculation........................................................................................................................................... 54
9 I²t Monitoring .............................................................................................................................................................. 54
10 Life Support Policy ..................................................................................................................................................... 55