User manual

TMCM-1180 and PD86-1180 TMCL Firmware V4.42 Manual (Rev. 1.08 / 2012-NOV-20) 20
www.trinamic.com
5.6 The ASCII interface
Since TMCL™ V3.21 there is also an ASCII interface that can be used to communicate with the module and to
send some commands as text strings.
The ASCII command line interface is entered by sending the binary command 139 (enter ASCII
mode).
Afterwards the commands are entered as in the TMCL-IDE. Please note that only those commands,
which can be used in direct mode, also can be entered in ASCII mode.
For leaving the ASCII mode and re-enter the binary mode enter the command BIN.
5.6.1 Format of the command line
As the first character, the address character has to be sent. The address character is A when the module
address is 1, B for modules with address 2 and so on. After the address character there may be spaces (but
this is not necessary). Then, send the command with its parameters. At the end of a command line a <CR>
character has to be sent.
Here are some examples for valid command lines:
AMVP ABS, 1, 50000
A MVP ABS, 1, 50000
AROL 2, 500
A MST 1
ABIN
These command lines would address the module with address 1. To address e.g. module 3, use address
character C instead of A. The last command line shown above will make the module return to binary mode.
5.6.2 Format of a reply
After executing the command the module sends back a reply in ASCII format. This reply consists of:
the address character of the host (host address that can be set in the module)
the address character of the module
the status code as a decimal number
the return value of the command as a decimal number
a <CR> character
So, after sending AGAP 0, 1 the reply would be BA 100 5000 if the actual position of axis 1 is 5000,
the host address is set to 2 and the module address is 1. The value 100 is the status code 100 that means
command successfully executed.
5.6.3 Commands that can be used in ASCII mode
The following commands can be used in ASCII mode: ROL, ROR, MST, MVP, SAP, GAP, STAP, RSAP, SGP, GGP,
STGP, RSGP, RFS, SIO, GIO, SCO, GCO, CCO, UF0, UF1, UF2, UF3, UF4, UF5, UF6, and UF7.
There are also special commands that are only available in ASCII mode:
BIN: This command quits ASCII mode and returns to binary TMCL™ mode.
RUN: This command can be used to start a TMCL™ program in memory.
STOP: Stops a running TMCL™ application.