Welcome, Guest

TOPIC: Programmatically Loading Motor Programs

Programmatically Loading Motor Programs 5 years 1 month ago #1093

  • joemlesker
  • joemlesker's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 1
  • Karma: 0
Hi,

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
The administrator has disabled public write access.

Re: Programmatically Loading Motor Programs 5 years 1 month ago #1096

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 459
  • Thank you received: 77
  • 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).
The administrator has disabled public write access.
Moderators: hsummer, csearcy, swalters, mmeyers
Time to create page: 0.228 seconds
Powered by Kunena Forum