User manual

TMCM-1161 TMCL Firmware V1.19 Manual (Rev. 1.04 / 2012-NOV-19) 15
www.trinamic.com
3.4 TMCL Command Overview
In this section a short overview of the TMCL commands is given.
3.4.1 TMCL Commands
Command
Number
Parameter
Description
ROR
1
<motor number>, <velocity>
Rotate right with specified velocity
ROL
2
<motor number>, <velocity>
Rotate left with specified velocity
MST
3
<motor number>
Stop motor movement
MVP
4
ABS|REL|COORD, <motor number>,
<position|offset>
Move to position (absolute or relative)
SAP
5
<parameter>, <motor number>, <value>
Set axis parameter (motion control
specific settings)
GAP
6
<parameter>, <motor number>
Get axis parameter (read out motion
control specific settings)
STAP
7
<parameter>, <motor number>
Store axis parameter permanently (non
volatile)
RSAP
8
<parameter>, <motor number>
Restore axis parameter
SGP
9
<parameter>, <bank number>, value
Set global parameter (module specific
settings e.g. communication settings
or TMCL™ user variables)
GGP
10
<parameter>, <bank number>
Get global parameter (read out module
specific settings e.g. communication
settings or TMCL™ user variables)
STGP
11
<parameter>, <bank number>
Store global parameter (TMCL™ user
variables only)
RSGP
12
<parameter>, <bank number>
Restore global parameter (TMCL™ user
variable only)
RFS
13
START|STOP|STATUS, <motor number>
Reference search
SIO
14
<port number>, <bank number>, <value>
Set digital output to specified value
GIO
15
<port number>, <bank number>
Get value of analogue/digital input
CALC
19
<operation>, <value>
Process accumulator & value
COMP
20
<value>
Compare accumulator <-> value
JC
21
<condition>, <jump address>
Jump conditional
JA
22
<jump address>
Jump absolute
CSUB
23
<subroutine address>
Call subroutine
RSUB
24
Return from subroutine
EI
25
<interrupt number>
Enable interrupt
DI
26
<interrupt number>
Disable interrupt
WAIT
27
<condition>, <motor number>, <ticks>
Wait with further program execution
STOP
28
Stop program execution
SCO
30
<coordinate number>, <motor number>,
<position>
Set coordinate
GCO
31
<coordinate number>, <motor number>
Get coordinate
CCO
32
<coordinate number>, <motor number>
Capture coordinate
CALCX
33
<operation>
Process accumulator & X-register
AAP
34
<parameter>, <motor number>
Accumulator to axis parameter
AGP
35
<parameter>, <bank number>
Accumulator to global parameter
VECT
37
<interrupt number>, <label>
Set interrupt vector
RETI
38
Return from interrupt
ACO
39
<coordinate number>, <motor number>
Accu to coordinate