TMCM-1311 TMCL Firmware V1.14 Manual (Rev. 1.18 / 2018-MAR-01) 2
www.trinamic.com
Table of Contents
2 Features ........................................................................................................................................................... 4
3 Putting the TMCM-1311 into Operation .......................................................................................................... 6
3.1 Connecting the TMCM-1311 .................................................................................................................... 6
3.2 Finding Optimum Settings with Parameterization Tool ........................................................................... 9
3.3 Using the TMCL-IDE to Develop Programs ............................................................................................. 11
3.3.1 Using TMCL Direct Mode .................................................................................................................. 12
3.3.2 Testing with a Simple TMCL Program ............................................................................................... 13
3.4 Important Motor Settings ...................................................................................................................... 14
4 TMCL and the TMCL-IDE: Introduction .......................................................................................................... 15
4.1 Binary Command Format ....................................................................................................................... 15
4.1.1 Checksum Calculation ....................................................................................................................... 15
4.2 Reply Format .......................................................................................................................................... 16
4.2.1 Status Codes ..................................................................................................................................... 17
4.3 Standalone Applications ......................................................................................................................... 17
4.4 The ASCII Interface ................................................................................................................................. 18
4.4.1 Format of the Command Line ........................................................................................................... 18
4.4.2 Format of a Reply ............................................................................................................................. 18
4.4.3 Commands Used in ASCII Mode ....................................................................................................... 18
4.4.4 Configuring the ASCII Interface ........................................................................................................ 19
5 TMCL Commands ........................................................................................................................................... 20
5.1 Motion Commands................................................................................................................................. 20
5.2 Parameter Commands ........................................................................................................................... 20
5.3 Control Commands ................................................................................................................................ 20
5.4 I/O Port Commands................................................................................................................................ 20
5.5 Calculation Commands........................................................................................................................... 21
5.6 Interrupt Commands .............................................................................................................................. 21
5.6.1 Interrupt Types: ................................................................................................................................ 21
5.6.2 Interrupt Processing: ........................................................................................................................ 21
5.6.3 Interrupt Vectors: ............................................................................................................................. 22
5.6.4 Further Configuration of Interrupts .................................................................................................. 22
5.6.5 Using Interrupts in TMCL .................................................................................................................. 22
5.6.6 ASCII Commands ............................................................................................................................... 23
5.7 Commands ............................................................................................................................................. 24
5.7.1 ROR (rotate right) ............................................................................................................................. 24
5.7.2 ROL (rotate left) ................................................................................................................................ 25
5.7.3 MST (motor stop) ............................................................................................................................. 26
5.7.4 MVP (move to position) .................................................................................................................... 27
5.7.5 SAP (set axis parameter) ................................................................................................................... 29
5.7.6 GAP (get axis parameter) .................................................................................................................. 30
5.7.7 STAP (store axis parameter) ............................................................................................................. 31
5.7.8 RSAP (restore axis parameter) .......................................................................................................... 32
5.7.9 SGP (set global parameter) ............................................................................................................... 33
5.7.10 GGP (get global parameter) .............................................................................................................. 34
5.7.11 STGP (store global parameter) ......................................................................................................... 35
5.7.12 RSGP (restore global parameter) ...................................................................................................... 36
5.7.13 RFS (reference search) ...................................................................................................................... 37
5.7.14 SIO (set input / output) ..................................................................................................................... 38
5.7.15 GIO (get input /output)..................................................................................................................... 40
5.7.16 CALC (calculate) ................................................................................................................................ 43
5.7.17 COMP (compare) .............................................................................................................................. 44
5.7.18 JC (jump conditional) ........................................................................................................................ 45
5.7.19 JA (jump always) ............................................................................................................................... 46
5.7.20 CSUB (call subroutine) ...................................................................................................................... 47
5.7.21 RSUB (return from subroutine)......................................................................................................... 48
5.7.22 WAIT (wait for an event to occur) .................................................................................................... 49
5.7.23 STOP (stop TMCL program execution) .............................................................................................. 49
5.7.24 SCO (set coordinate) ......................................................................................................................... 51