User manual
PD-1021 TMCL Firmware V1.19 Manual (Rev. 1.01 / 2012-JUL-30) 57
www.trinamic.com
3.5.38 TMCL Control Functions
The following functions are for host control purposes only and are not allowed for standalone mode.
In most cases, there is no need for the customer to use one of those functions (except command 139).
TMCL control commands have no mnemonics, as they cannot be used in TMCL programs. These Functions
are to be used only by the TMCL-IDE (e.g. to download a TMCL application into the module).
CONTROL COMMANDS THAT COULD BE USEFUL FOR A USER HOST APPLICATION ARE:
- get firmware revision (command 136, please note the special reply format of this command,
described at the end of this section)
- run application (command 129)
All other functions can be achieved by using the appropriate functions of the TMCL-IDE!
Instruction
Description
Type
Mot/Bank
Value
128 – Stop application
A running TMCL standalone
application is stopped
(don't care)
(don't care)
(don't care)
129 – Run application
TMCL execution is started (or
continued)
0 - run from
current address
1 - run from
specified address
(don't care)
(don't care)
starting address
130 – Step application
Only the next command of a
TMCL application is executed
(don't care)
(don't care)
(don't care)
131 – Reset application
The program counter is set
to zero, and the standalone
application is stopped
(when running or stepped)
(don't care)
(don't care)
(don't care)
132 – Start download
mode
Target command execution
is stopped and all following
commands are transferred to
the TMCL memory
(don't care)
(don't care)
starting address
of the application
133 – Quit download
mode
Target command execution
is resumed
(don't care)
(don't care)
(don't care)
134 – Read TMCL
memory
The specified program
memory location is read
(don't care)
(don't care)
<memory
address>
135 – Get application
status
One of these values is
returned:
0 – stop
1 – run
2 – step
3 – reset
(don't care)
(don't care)
(don't care)
136 – Get firmware
version
Return the module type and
firmware revision either as a
string or in binary format
0 – string
1 – binary
(don’t care)
(don’t care)
137 – Restore factory
settings
Reset all settings stored in
the EEPROM to their factory
defaults
This command does not
send back a reply.
(don’t care)
(don’t care)
must be 1234
138 – Request target
position reached event
Send an additional reply
when the motor has
reached its target position
(don't care)
(don't care)
(don't care)