Page 1 of 1

MIAC Stepper Motor Speed Control

Posted: Mon Mar 18, 2013 9:08 am
by Chris_MIRA
Hi,
Im using a MIAC to directly drive a stepper motor, everything works well in simulation and I can control the speed by varieing the delay between steps. However when running the programm on the MIAC, the speed is constant (and slow) regardles of the delay time. Any ideas? Help much apresiated! Is there a "Speed Setting" on the MIAC or stepper MACRO that Im missing?
Regards,
Chris

Re: MIAC Stepper Motor Speed Control

Posted: Mon Mar 18, 2013 11:00 am
by Benj
Hi Chris,

The problem is likely to be inside your program. Could you attach it so we can have a look.

You can PM me with it if the program is commercially sensitive.

Re: MIAC Stepper Motor Speed Control

Posted: Tue Mar 26, 2013 9:01 am
by Chris_MIRA
Hi,
Please find the code file attached. As I said in the original post, the speed variation is fine in simulation but not on the real MIAC hardware. Any help / advice welcome!
Regards,
Chris

Re: MIAC Stepper Motor Speed Control

Posted: Tue Apr 09, 2013 8:17 am
by Chris_MIRA
Hi, any further thoughts on the code I attached? I still cant get a faster speed on the motor.
Regards,
Chris

Re: MIAC Stepper Motor Speed Control

Posted: Tue Apr 09, 2013 9:20 am
by Benj
Hi Chris,

All the delays and LCD commands will be consuming processor run time which means that the delays in between steps may be a bit longer then you are expecting.

One way would be to enable the motor and then configure a timer interrupt to run. Varying the speed of the interrupt will vary the speed of the motor and disabling the timer interrupt will stop the motor. Remember to disable the motor if it is stopped for periods of time or you risk burning our the motor coils.