can i write program to control step motors? RRS feed

  • Question

  • hello,

    For a project, i need to control the rotation of two step motors. I am wondering if i can write code to control the motors?

    Does anyone know if there is a sample?

    Thank you.

    Wednesday, May 4, 2011 2:11 AM


  • Hi Tubong

    MRDS works great for controlling stepper motors; your questions is really one about how to interface the stepper motor to the computer.  There are many options, with the implementation details depending on the specifics of the controller + motor combination that you choose.  For instance, if you're will to spend some money, you can buy a prepackaged motor controller with a RS232 interface.  It's fairly straightforward to write a MRDS service which can send and receive RS232 commands.  For another option, while I don't know of any examples off the top of my head right now, other manufuctures offer controllers that come with a C# dll which you could add as an assembly into your C# service project and communicate with the motor by this means.  If you're will to delve into the world of interopt, you can controller that come with a C/C++ dll.

    I'd first start by selecting what sort of motor you want, and then look at your controller options.  Controllers with an RS232 communication protocol or C# interface will be the give you the least amount of fuss. Also, search the forum for some previous examples.

    Friday, May 6, 2011 10:30 PM