User manual

PDx-113-57/60-SE / TMCM-113-57/60-SE Firmware Manual (V1.10 / 2009-OCT-28) 10
Copyright © 2009, TRINAMIC Motion Control GmbH & Co. KG
5.2 Writing a simple TMCL
TM
program
1. Type the following text in the open window.
//A simple example for using TMCL and the TMCL-IDE
SAP 4, 0, 1000 //Set the maximum speed
Loop: MVP ABS, 0, 150000 //Move to position 150000
WAIT POS, 0, 0
WAIT TICKS, 0, 200
MVP ABS, 0, 0 //Move back to position 0
WAIT POS, 0, 0
WAIT TICKS, 0, 100
JA Loop // Infinite Loop
Assemble
Download Run
Stop
2. Click the Assemble icon.
3. Thereafter click the Download icon to download the code into the TMCM-113-57/60-SE.
4. Click the Run icon. The downloaded program will now be executed.
5. Click Stop button to stop the program.