Pages: [1]   Go Down
Author Topic: sending a motion command over serial  (Read 495 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
I am relatively new to arduino, so please bear with me.  I have a stepper motor with built in motion control (IMS MDrive MDI23) I would like to control with my Arduino.  Normally, the command set for the stepper motor is given over an open serial port on the computer.  For example, to move the motor 5000 steps, the command would be "mr 5000" followed by a carriage return.  My question is, how do I get the arduino to send out that kind of command?  It would be a transmit only command i.e. there is no need for a receive command back.  I just need to transmit the commands.  Thanks
JOe
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27113
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Something simple, such as:

Serial.println ("mr 5000");

What is the electrical interface - do you need to be  a USB master, is it RS232 levels, is it simple TTL levels?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I used your suggestion of Serial.println("mr 5000").  When I open the serial monitor tool in the arduino software, I see mr 5000 print out, but nothing is happening with my motor.  I am trying to communicate over rs485.  I have the rs485 shield on the uno, but no luck.  I am guessing it is a communications issue, but I'm not exactly sure how to proceed.  Any suggestions would be appreciated. Thanks
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 614
Posts: 49372
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am guessing it is a communications issue, but I'm not exactly sure how to proceed.
You could post links to the hardware in question, and a schematic, so that guessing wouldn't be required. It's up to you.
Logged

Pages: [1]   Go Up
Jump to: