User Manual

TMCM-3230 TMCL
Firmware Manual Firmware Version V1.07 | Document Revision V1.05 2017-OCT-10
8 / 103
2.3 Testing with a simple TMCL Program
Now, test the TMCL stand alone mode with a simple TMCL program. To type in, assemble and download
the program, you will need the TMCL creator. This is also a tool that can be found in the tool tree of
the TMCL-IDE. Click the TMCL creator entry to open the TMCL creator. In the TMCL creator, type in the
following little TMCL program:
1
ROL 0, 51200 //Rotate motor 0 with speed 10000
WAIT TICKS , 0, 500
3
MST 0
ROR 0, 51200 //Rotate motor 0 with 50000
5
WAIT TICKS , 0, 500
MST 0
7
SAP 4, 0, 51200 //Set max. Velocity
9
SAP 5, 0, 51200 //Set max. Acceleration
Loop:
11
MVP ABS , 0, 512000 //Move to Position 512000
WAIT POS , 0, 0 //Wait until position reached
13
MVP ABS , 0, -512000 //Move to Position -512000
WAIT POS , 0, 0 //Wait until position reached
15
JA Loop //Infinite Loop
After you have done that, take the following steps:
1.
Click the Assemble icon (or choose Assemble from the TMCL menu) in the TMCL creator to assemble
the program.
2.
Click the Download icon (or choose Download from the TMCL menu) in the TMCL creator to donwload
the program to the module.
3.
Click the Run icon (or choose Run from the TMCL menu) in the TMCL creator to run the program on
the module.
Also try out the debugging functions in the TMCL creator:
1. Click on the Bug icon to start the debugger.
2. Click the Animate button to see the single steps of the program.
3. You can at any time pause the program, set or reset breakpoints and resume program execution.
4. To end the debug mode click the Bug icon again.
©2017 TRINAMIC Motion Control GmbH & Co. KG, Hamburg, Germany
Terms of delivery and rights to technical change reserved.
Download newest version at www.trinamic.com