![Trinamic TMCM-351 Скачать руководство пользователя страница 8](http://html1.mh-extra.com/html/trinamic/tmcm-351/tmcm-351_firmware-manual_1163054008.webp)
TMCM-351 TMCL Firmware V4.45 Manual (Rev. 1.06 / 2014-MAY-16)
8
www.trinamic.com
2.2
Testing with a Simple TMCL Program
2.2.1
Testing without Encoder
Assemble
Download
Run
Stop
1.
Click on Icon
Assemble
to convert the TMCL into machine code.
2.
Then download the program to the TMCM-351 module via the icon
Download
.
3.
Press icon
Run
. The desired program will be executed.
4.
Click
Stop
button to stop the program.
//A simple example for using TMCL™ and TMCL-IDE
ROL
0, 500
//Rotate motor 0 with speed 500
WAIT
TICKS
, 0, 500
MST
0
ROR
1, 250
//Rotate motor 1 with 250
WAIT
TICKS
, 0, 500
MST
1
SAP
4, 2, 500
//Set max. Velocity
SAP
5, 2, 50
//Set max. Acceleration
Loop:
MVP
ABS
, 2, 10000
//Move to Position 10000
WAIT
POS
, 2, 0
//Wait until position reached
MVP
ABS
, 2, -10000
//
Move to Position -10000
WAIT
POS
, 2, 0
//Wait until position reached
JA
Loop
//Infinite Loop