TMCL™ FIRMWARE MANUAL Firmware Update V1.03


Add to my manuals
85 Pages

advertisement

TMCL™ FIRMWARE MANUAL  Firmware Update V1.03 | Manualzz

TMCM-1110 TMCL™ Firmware V1.03 Manual (Ref. 1.07 / 2012-APR-11) 15

4.3.1 Testing with a Simple TMCL™ Program

Open the file test2.tmc of the TMCL-IDE. The test program is written for three motors. Change the motor numbers into 0, if only one motor is connected.

Now, the test program looks as follows:

//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

0

, 250 //Rotate motor 0 with 250

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

Assemble Stop

Download Run

1.

2.

3.

4.

Click on Icon Assemble to convert the TMCL™ into machine code.

Then download the program to the TMCM-1110 module via the icon Download.

Press icon Run. The desired program will be executed.

Click Stop button to stop the program.

4.4 TMCL™ Command Overview

In this section a short overview of the TMCL™ commands is given.

4.4.1 TMCL™ Commands

Command Number Parameter

ROR

ROL

1

2

<motor number>, <velocity>

<motor number>, <velocity>

MST

MVP

SAP

3

4

5

<motor number>

ABS|REL|COORD, <motor number>,

<position|offset>

<parameter>, <motor number>, <value>

GAP

STAP

RSAP

SGP

6

7

8

9

<parameter>, <motor number>

<parameter>, <motor number>

<parameter>, <motor number>

<parameter>, <bank number>, value

Description

Rotate right with specified velocity

Rotate left with specified velocity

Stop motor movement

Move to position (absolute or relative)

Set axis parameter (motion control specific settings)

Get axis parameter (read out motion control specific settings)

Store axis parameter permanently (non volatile)

Restore axis parameter

Set global parameter (module specific settings e.g. communication settings or TMCL™ user variables) www.trinamic.com

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals

advertisement

Table of contents