
TMCM-6110 TMCL Firmware V1.31 Manual (Rev. 1.09 / 2015-FEB-24)
22
www.trinamic.com
4.5
The ASCII Interface
There is also an ASCII interface that can be used to communicate with the module and to send some
commands as text strings.
P
ROCEED AS FOLLOWS
-
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.
4.5.1
Command Line Format
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.
E
XAMPLES 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.
4.5.2
Format of a Reply
After executing the command the module sends back a reply in ASCII format. The 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
.
4.5.3
Commands 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.
S
PECIAL COMMANDS WHICH 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.