Welcome, Guest
Username Password: Remember me
  • Page:
  • 1

TOPIC: Programmatically Loading Motor Programs

Programmatically Loading Motor Programs 3 years, 3 months ago #1093


I’m trying to programmatically load motor programs onto SM23 motors (class 4). I write a SMS file within the Smartmotor Interface, and then ‘CompileCompile Downloadable SMX File’, send a ‘LOAD’ command to the motor, and send the contents of the *.smx file 8 bytes at a time, and append xFF. This all works fine.

But I’d like to also read back the contents of the motor program to verify that the transmission succeeded. I use the ‘UPLOAD’ command to receive the contents, and compare it to the *.smx file. The only issue I have is that the SMX file is not 100% verbose, and replaces certain commands with other characters (i.e. ‘IF’ becomes ‘$I003F’). The uploaded program has the verbose, SMS text.

Do you have suggestions on how to verify a motor program’s contents? Is it possible to send a SMS file instead of a SMX file (I guess I could just try this)? I could do a search and replace on the SMX file, but swaps don’t appear to be consistent (i.e. ‘WHILE’ becomes ‘$W0059LE’ and ‘$W0083LE’ within the same file). Thanks for any help.

-Joe McFerron

Re: Programmatically Loading Motor Programs 3 years, 3 months ago #1096

  • csearcy
  • Posts: 480
  • Karma: 23
The command RCKS will return the checksum of the program that is loaded in the motor.
The recommended method is to compare the returned checksum with the checksum of your known good program.
Another method is to use the UP command... which will return the program in binary(same as the .smx file).
  • Page:
  • 1
Moderators: hsummer, csearcy
Time to create page: 0.38 seconds