User Manual
TMCM-343 Hardware Manual (V1.07 / 2011-JUN-08) 21
Copyright © 2011, TRINAMIC Motion Control GmbH & Co. KG
8 Putting the TMCM-343 into operation
On the basis of a small example it is shown step by step how the TMCM-343 is set into operation.
Experienced users could skip this chapter and proceed to chapter 9.
Example: The following application is to implement with the TMCL-IDE Software development
environment in the TMCM-343 module. For data transfer between the host PC and the module the
RS232 interface is employed.
A formula how speed is converted into a physical unit like rotations per seconds can be found in
chapter Calculation: Velocity and acceleration vs. microstep and fullstep frequency.
Turn Motor 0 left with speed 500
Turn Motor 1 right with speed 500
Turn Motor 2 with speed 500, acceleration 5 and move between position +10000 and –10000.
Step 1: Connect the RS232 Interface as specified in 7.7.
Step 2: Connect the motors as specified in 7.3.
Step 3: Connect the power supply.
+5 VDC to pins 1 or 3
Ground to pins 2, 4, 6, 8 or 10
Step 4: Connect the motor supply voltage
+10 to 30 VDC to pins 5, 7, 9
Step 5: Switch on the power supply and the motor supply. An on-board LED should start to
flash. This indicates the correct configuration of the microcontroller.
Step 6: Start the TMCL-IDE Software development environment. Open file test2.tmc. The
following source code appears on the screen:
A description for the TMCL commands can be found in Appendix A.
Step 7: Click on Icon Assemble to convert the TMCL™ into machine code.
Then download the program to the TMCM-343 module via the Icon Download.
Step 8: Press Icon Run. The desired program will be executed.
Please refer to the TMCM-341/342/343 TMCL™ Firmware Manual for further information about the
commands.
The next chapter discusses additional operations to turn the TMCM-343 into a high performance
motion control system.
//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