![Trinamic TMCM-351 Firmware Manual Download Page 11](http://html1.mh-extra.com/html/trinamic/tmcm-351/tmcm-351_firmware-manual_1163054011.webp)
TMCM-351 TMCL Firmware V4.45 Manual (Rev. 1.06 / 2014-MAY-16)
11
www.trinamic.com
3
Overview
As with most TRINAMIC modules the software running on the microprocessor of the TMCM-351 consists of
two parts, a boot loader and the firmware itself. Whereas the boot loader is installed during production and
testing at TRINAMIC and remains – normally – untouched throughout the whole lifetime, the firmware can
be updated by the user. New versions can be downloaded free of charge from the TRINAMIC website
(
The firmware shipped with this module is related to the standard TMCL firmware [TMCL] shipped with most
of TRINAMIC modules with regard to protocol and commands. Corresponding, the module is based on the
TMC428/429 stepper motor controller and the TMC249 power driver and supports the standard TMCL with a
special range of values. Further you can order the module with encoder option, realized with the TMC423.
4
TMCL and TMCL-IDE
The TMCM-351module supports TMCL direct mode (binary commands or ASCII interface) and standalone
TMCL program execution. You can store up to 2048 TMCL instructions on it. In direct mode and most cases
the TMCL communication over RS485, RS232, USB and CAN follows a strict master/slave relationship. That is,
a host computer (e.g. PC/PLC) acting as the interface bus master will send a command to the module. The
TMCL interpreter on it will then interpret this command, do the initialization of the motion controller, read
inputs and write outputs or whatever is necessary according to the specified command. As soon as this step
has been done, the module will send a reply back over RS485/RS232/USB/CAN to the bus master. Only then
should the master transfer the next command. Normally, the module will just switch to transmission and
occupy the bus for a reply, otherwise it will stay in receive mode. It will not send any data over the
interface without receiving a command first. This way, any collision on the bus will be avoided when there
are more than two nodes connected to a single bus.
The Trinamic Motion Control Language (TMCL) provides a set of structured motion control commands. Every
motion control command can be given by a host computer or can be stored in an EEPROM on the TMCM-351
to form programs that run stand-alone on the module. For this purpose there are not only motion control
commands but also commands to control the program structure (like conditional jumps, compare and
calculating).
Every command has a binary representation and a mnemonic. The binary format is used to send commands
from the host to a module in direct mode, whereas the mnemonic format is used for easy usage of the
commands when developing standalone TMCL applications using the TMCL-IDE (IDE means
Integrated
Development Environment
).
There is also a set of configuration variables for the axis and for global parameters which allow individual
configuration of nearly every function of a module. This manual gives a detailed description of all TMCL
commands and their usage.
4.1
Binary command format
Every command has a mnemonic and a binary representation. When commands are sent from a host to a
module, the binary format has to be used. Every command consists of a one-byte command field, a one-byte
type field, a one-byte motor/bank field and a four-byte value field. So the binary representation of a
command always has seven bytes.
When a command is to be sent via RS232, RS485 or USB interface, it has to be enclosed by an address byte
at the beginning and a checksum byte at the end. In this case it consists of nine bytes.
This is different when communicating takes place via the CAN bus. Address and checksum are included in
the CAN standard and do not have to be supplied by the user.
The binary command format for RS232, RS485, and USB is as follows: