User manual

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