User manual

TMCM-1640 TMCL Firmware V2.00 Manual (Rev. 2.00 / 2012-JUL-31) 12
www.trinamic.com
4.3 Standalone Applications
The module is equipped with an EEPROM for storing TMCL applications. You can use the TMCL-IDE for
developing standalone TMCL applications. You can load your program down into the EEPROM and then it
will run on the module. The TMCL-IDE contains an editor and a TMCL assembler where the commands can
be entered using their mnemonic format. They will be assembled automatically into their binary
representations. Afterwards this code can be downloaded into the module to be executed there.
4.4 Testing with a Simple TMCL Program
Open the file test2.tmc of the TMCL-IDE. The following source code appears on the screen:
Assemble
Download Run
Stop
Figure 4.1: Assemble, download, stop, and run icons of TMCL-IDE
Click on icon Assemble to convert the TMCL example into binary code.
Then download the program to the TMCM-1640 module via the icon Download.
Press icon Run. The desired program will be executed.
Click Stop button to stop the program.
For further information about the TMCL-IDE and TMCL programming techniques please refer to the TMCL-IDE
User Manual on TRINAMICs website.
TRINAMIC offers two software tools for BLDC applications: the TMCM-BLDC and the BLDC tool of the
TMCL-IDE. Whereas the TMCM-BLDC is used for testing different configurations in all modes of
operation the TMCL-IDE is mainly designed for conceiving programs and firmware updates. New
versions of the TMCM-BLDC and the TMCL-IDE can be downloaded free of charge from the TRINAMIC
website (http://www.trinamic.com).
//A simple example for using TMCL and TMCL-IDE
Loop:
ROL 0, 4000 //rotate left with 4000 rpm
WAIT TICKS, 0, 2000
ROR 0, 4000 //rotate right with 4000 rpm
WAIT TICKS, 0, 2000
JA Loop