User Manual
Table Of Contents
- 1 Features
- 2 First Steps with TMCL
- 3 TMCL and the TMCL-IDE — An Introduction
- 3.1 Binary Command Format
- 3.2 Reply Format
- 3.3 Standalone Applications
- 3.4 The ASCII Interface
- 3.5 TMCL Command Overview
- 3.6 TMCL Commands by Subject
- 3.7 Detailed TMCL Command Descriptions
- 3.7.1 ROR (Rotate Right)
- 3.7.2 ROL (Rotate Left)
- 3.7.3 MST (Motor Stop)
- 3.7.4 MVP (Move to Position)
- 3.7.5 SAP (Set Axis Parameter)
- 3.7.6 GAP (Get Axis Parameter)
- 3.7.7 STAP (Store Axis Parameter)
- 3.7.8 RSAP (Restore Axis Parameter)
- 3.7.9 SGP (Set Global Parameter)
- 3.7.10 GGP (Get Global Parameter)
- 3.7.11 STGP (Store Global Parameter)
- 3.7.12 RSGP (Restore Global Parameter)
- 3.7.13 RFS (Reference Search)
- 3.7.14 SIO (Set Output)
- 3.7.15 GIO (Get Input)
- 3.7.16 CALC (Calculate)
- 3.7.17 COMP (Compare)
- 3.7.18 JC (Jump conditional)
- 3.7.19 JA (Jump always)
- 3.7.20 CSUB (Call Subroutine)
- 3.7.21 RSUB (Return from Subroutine)
- 3.7.22 WAIT (Wait for an Event to occur)
- 3.7.23 STOP (Stop TMCL Program Execution – End of TMCL Program)
- 3.7.24 SCO (Set Coordinate)
- 3.7.25 GCO (Get Coordinate)
- 3.7.26 CCO (Capture Coordinate)
- 3.7.27 ACO (Accu to Coordinate)
- 3.7.28 CALCX (Calculate using the X Register)
- 3.7.29 AAP (Accu to Axis Parameter)
- 3.7.30 AGP (Accu to Global Parameter)
- 3.7.31 CLE (Clear Error Flags)
- 3.7.32 EI (Enable Interrupt)
- 3.7.33 DI (Disable Interrupt)
- 3.7.34 VECT (Define Interrupt Vector)
- 3.7.35 RETI (Return from Interrupt)
- 3.7.36 Customer specific Command Extensions (UF0…UF7 – User Functions)
- 3.7.37 Request Target Position reached Event
- 3.7.38 TMCL Control Commands
- 4 Axis Parameters
- 5 Global Parameters
- 6 Module Specific Hints
- 7 Hints and Tips
- 8 TMCL Programming Techniques and Structure
- 9 Figures Index
- 10 Tables Index
- 11 Supplemental Directives
- 12 Revision History

PD-1160 TMCL
™
Firmware Manual • Firmware Version V1.42 | Document Revision V1.06 • 2018-JAN-09
91 / 113
6 Module Specific Hints
This section contains some hints that are specific to the PD-1160 module.
6.1 Velocity and Acceleration Calculation
On the PD-1160 module, the internal units of the TMC429 motion controller IC are used to specify velocity
and acceleration values. The formulae for converting between internal units of this module and real world
units are given in this section.
Note
The Parameter Calculator tool in the TMCL-IDE can be used to easily convert
between all velocity and acceleration units. So it is normally not necessary to do
the following calculations manually.
6.1.1 Velocity Conversion
Axis parameters #2, #3, #4, #130, #181, #182 , #194 and #195 use internal units ([int], value range 0. . . 2047
resp. -2047. . . 2047). Axis parameter #154 (pulse divisor) defines the relation between internal velocity
units and real world velocity units (pulses (microsteps) per second [pps]).
The formula for conversion from internal velocity units to pps is:
v
pps
=
16 · 10
6
· v
int
2
pulse_div
· 2048 · 32
(1)
where
v
int
is the velocity value in internal units (-2047. . . 2047) and
pulse_div
is the pulse divisor (0. . . 13,
axis parameter #154). The result v
pps
is the resulting microstep frequency.
For example, a velocity value of 1678 (
v
int
= 1678) and a pulse divisor of 3 (
pulse_div
= 3) will result in a
microstep frequency of approximately 51208.5pps.
To convert from microstep frequency to fullstep frequency, the microstep resolution (parameter #140) has
to be taken into account. Just divide the microstep frequency by the microstep resolution to convert this
into fullstep frequency:
f
full
=
f
µ
2
ap
140
(2)
where
f
full
is the fullstep frequency,
f
µ
is the microstep frequency (same as
v
pps
in equation (1)), and
ap
140
is the value of axis parameter #140 (0. . . 8).
6.1.2 Acceleration Conversion
Axis parameter #5 uses internal units ([int], value range 0. . . 2047) to define the acceleration ramp. Axis
parameters #153 (ramp divisor) and #154 (pulse divisor) define the relation between internal acceleration
units and real world acceleration units (pps per second [pps
2
]).
The formula for conversion from internal acceleration units to pps
2
is:
a
pps
=
(16 · 10
6
)
2
· a
int
2
ramp_div+pulse_div+29
(3)
where
a
pps
is the acceleration in pps
2
and
a
int
is the acceleration value in internal units. The value
ramp_div
is axis parameter #153 and the value pulse_div is axis parameter #154.
For example, an acceleration value of 100 (
a
int
= 100) together with a ramp divisor of 7 (
ramp_div
= 7) and
a pulse divisor of 3 (pulse_div = 3) will result in an acceleration of approximately 46566pps
2
.
©2018 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com