02.06.2013 Views

TMCL™ Firmware Manual - Trinamic

TMCL™ Firmware Manual - Trinamic

TMCL™ Firmware Manual - Trinamic

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

PD-109-57 V2 TMCL <strong>Firmware</strong> <strong>Manual</strong> (V1.00/2010-FEB-18) 11<br />

Choose COM port and type with fitting parameters (baud rate 9600 for RS232). Click OK.<br />

5.2 Testing with a simple TMCL program<br />

Open the file test2.tmc. The following source code appears on the screen:<br />

A description for the TMCL commands can be found in Appendix A.<br />

//A simple example for using TMCL and TMCL-IDE<br />

ROL 0, 500 //Rotate motor 0 with speed 500<br />

WAIT TICKS, 0, 500<br />

MST 0<br />

ROR 0, 250 //Rotate motor 1 with 250<br />

WAIT TICKS, 0, 500<br />

MST 0<br />

SAP 4, 0, 500 //Set max. Velocity<br />

SAP 5, 0, 50 //Set max. Acceleration<br />

Loop: MVP ABS, 0, 10000 //Move to Position 10000<br />

WAIT POS, 0, 0 //Wait until position reached<br />

MVP ABS, 0, -10000 //Move to Position -10000<br />

WAIT POS, 0, 0 //Wait until position reached<br />

JA Loop //Infinite Loop<br />

Assemble<br />

Download Run<br />

Copyright © 2010, TRINAMIC Motion Control GmbH & Co. KG<br />

Stop<br />

1. Click on icon Assemble to convert the TMCL into binary code.<br />

2. Then download the program to the TMCM-109 module via the icon Download.<br />

3. Press icon Run. The desired program will be executed.<br />

4. Click Stop button to stop the program.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!