User manual

TMCM-1180 and PD86-1180 TMCL Firmware V4.42 Manual (Rev. 1.08 / 2012-NOV-20) 2
www.trinamic.com
Table of contents
1 Life support policy ....................................................................................................................................................... 4
2 Features ........................................................................................................................................................................... 5
3 Overview ......................................................................................................................................................................... 6
4 Putting the PD86-1180 into operation ................................................................................................................... 7
4.1 Starting up ............................................................................................................................................................. 7
4.2 Testing with a simple TMCL™ program ..................................................................................................... 10
4.3 Operating the module in direct mode ........................................................................................................ 11
5 TMCL™ and TMCL-IDE ............................................................................................................................................... 12
5.1 Binary command format.................................................................................................................................. 12
5.2 Reply format........................................................................................................................................................ 13
5.2.1 Status codes .................................................................................................................................................. 14
5.3 Standalone applications .................................................................................................................................. 14
5.4 TMCL™ command overview ........................................................................................................................... 14
5.4.1 Motion commands ...................................................................................................................................... 14
5.4.2 Parameter commands ................................................................................................................................ 15
5.4.3 I/O port commands .................................................................................................................................... 15
5.4.4 Control commands ...................................................................................................................................... 15
5.4.5 Calculation commands ............................................................................................................................... 15
5.4.6 Interrupt commands................................................................................................................................... 16
5.5 TMCL™ list of commands ............................................................................................................................... 18
5.6 The ASCII interface ........................................................................................................................................... 20
5.6.1 Format of the command line .................................................................................................................. 20
5.6.2 Format of a reply ........................................................................................................................................ 20
5.6.3 Commands that can be used in ASCII mode ..................................................................................... 20
5.6.4 Configuring the ASCII interface .............................................................................................................. 21
5.7 Commands ........................................................................................................................................................... 22
5.7.1 ROR (rotate right) ........................................................................................................................................ 22
5.7.2 ROL (rotate left) ............................................................................................................................................ 23
5.7.3 MST (motor stop) ......................................................................................................................................... 24
5.7.4 MVP (move to position) ............................................................................................................................. 25
5.7.5 SAP (set axis parameter) ........................................................................................................................... 27
5.7.6 GAP (get axis parameter) .......................................................................................................................... 32
5.7.7 STAP (store axis parameter) ..................................................................................................................... 38
5.7.8 RSAP (restore axis parameter) ................................................................................................................. 41
5.7.9 SGP (set global parameter) ....................................................................................................................... 44
5.7.10 GGP (get global parameter) ...................................................................................................................... 47
5.7.11 STGP (store global parameter) ................................................................................................................ 51
5.7.12 RSGP (restore global parameter) ............................................................................................................ 53
5.7.13 RFS (reference search) ................................................................................................................................ 55
5.7.14 SIO (set output) ........................................................................................................................................... 56
5.7.15 GIO (get input/output) ............................................................................................................................... 57
5.7.16 CALC (calculate) ............................................................................................................................................ 59
5.7.17 COMP (compare) ........................................................................................................................................... 60
5.7.18 JC (jump conditional) ................................................................................................................................. 61
5.7.19 JA (jump always) ......................................................................................................................................... 62
5.7.20 CSUB (call subroutine)................................................................................................................................ 63
5.7.21 RSUB (return from subroutine) ................................................................................................................ 64
5.7.22 WAIT (wait for an event to occur) ......................................................................................................... 65
5.7.23 STOP (stop TMCL™ program execution) ............................................................................................... 66
5.7.24 SCO (set coordinate) ................................................................................................................................... 67
5.7.25 GCO (get coordinate) .................................................................................................................................. 68
5.7.26 CCO (capture coordinate) .......................................................................................................................... 69
5.7.27 ACO (accu to coordinate; valid from TMCL™ version 4.18 on) ...................................................... 70
5.7.28 CALCX (calculate using the X register) .................................................................................................. 71
5.7.29 AAP (accumulator to axis parameter) .................................................................................................... 72
5.7.30 AGP (accumulator to global parameter) ............................................................................................... 77