Download mode

Download mode

Postby Naligator » 04 Sep 2006, 20:13

Hi,

I need to download .bin format created using TMCL-IDE to my TMCM610 controller using my own C application. How can I do this ? Have you got a C source example for this purpose ?

Thanks
Naligator
User
User
 
Posts: 13
Joined: 04 Sep 2006, 20:04

Postby Olav Kahlbaum (TRINAMIC) » 12 Sep 2006, 10:39

The format of the .bin file is quite simple. It just contains the binary commands, but without the address byte. So every command in the file consists of eight bytes: command byte, type, motor, 4 byte value, checksum.
To download it to the module, just do the following:

Send the "enter download mode" command (command 132, type=0, bank=0, value=start address (normally 0)).

For every command in the file:
Read 8 bytes from the file. Send the address byte of the module, and add the address byte to the checksum byte (the 8th byte of the record from the file). Then send these 8 bytes.
The module will send a reply where the status code is set to 101 (this means "command stored").

After the last command has been sent, send the "exit download mode" command (command 133, all parameters set to 0).

This is the download procedure.
User avatar
Olav Kahlbaum (TRINAMIC)
Site Admin
 
Posts: 3412
Joined: 11 Aug 2006, 08:02

Postby lilya » 17 Jun 2007, 13:29

Hello,
About binary file :
Now there is only one option :
to create binary file from PC SW.
For me it's not so comfortable, we want to have some option to create binary file before we are downloading and not to use with something that allready was created on PC. We have number of devices with same controller program , but with different value , duaring run time I want to load this two files and create merge file , and this merge file I want to download to controller. My question is : Do you have option to Assemble programm in run time and not only from PC SW ?

Thank you ,
Lilya.
lilya
User
User
 
Posts: 9
Joined: 10 Jun 2007, 13:45

Postby Olav Kahlbaum (TRINAMIC) » 18 Jun 2007, 08:11

Sorry, but we do not have such an option. This would be something like a TMCL assembler as a command line tool that can be called from any other program at runtime. But this is a good idea for our future developments.
User avatar
Olav Kahlbaum (TRINAMIC)
Site Admin
 
Posts: 3412
Joined: 11 Aug 2006, 08:02

Postby lilya » 18 Jun 2007, 08:46

In some another controllers there is option "compile" , You just need to send line by line to controller , and after it "compile" this will convert to binary.
From my (user) point of you I don't need to know that you are working with binary , I need to send normal program ...
Nowthis is difficult problem for us...
lilya
User
User
 
Posts: 9
Joined: 10 Jun 2007, 13:45


Return to Trinamic Motion Control Language (TMCL)

Who is online

Users browsing this forum: Google [Bot] and 2 guests