
TMCM-1311 TMCL Firmware V1.11 Manual (Rev. 1.17 / 2015-NOV-05)
13
www.trinamic.com
3.3.2
Testing with a Simple TMCL Program
Type in the following program:
Assemble
Download
Run
Stop
1.
Click the
Assemble
icon to convert the TMCL program into binary code.
2.
Then download the program to the TMCM-1311 module by clicking the
Download
icon.
3.
Click the
Run
icon. The desired program will be executed.
4.
Click the
Stop
button to stop the program.
ROL
0, 50000
//Rotate motor 0 with speed 50000
WAIT
TICKS
, 0, 500
MST
0
ROR
0, 50000
//Rotate motor 0 with 50000
WAIT
TICKS
, 0, 500
MST
0
SAP
4, 0, 50000
//Set max. Velocity
SAP
5, 0, 50000
//Set max. Acceleration
Loop:
MVP
ABS
, 0, 100000
//Move to Position 10000
WAIT
POS
, 0, 0
//Wait until position reached
MVP
ABS
, 0, -100000
//
Move to Position -10000
WAIT
POS
, 0, 0
//Wait until position reached
JA
Loop
//Infinite Loop