MIAC Stepper Motor Speed Control

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

MIAC Stepper Motor Speed Control

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC Stepper Motor Speed Control

Post 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.

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: MIAC Stepper Motor Speed Control

Post 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
Attachments
BEST Revolver stuff.fcf
(17.81 KiB) Downloaded 336 times

Chris_MIRA
Posts: 186
Joined: Wed Jan 23, 2013 3:43 pm
Has thanked: 2 times
Been thanked: 21 times
Contact:

Re: MIAC Stepper Motor Speed Control

Post by Chris_MIRA »

Hi, any further thoughts on the code I attached? I still cant get a faster speed on the motor.
Regards,
Chris

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: MIAC Stepper Motor Speed Control

Post 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.

Post Reply