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
MIAC Stepper Motor Speed Control
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
Re: MIAC Stepper Motor Speed Control
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
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 358 times
-
- Posts: 186
- Joined: Wed Jan 23, 2013 3:43 pm
- Has thanked: 2 times
- Been thanked: 21 times
Re: MIAC Stepper Motor Speed Control
Hi, any further thoughts on the code I attached? I still cant get a faster speed on the motor.
Regards,
Chris
Regards,
Chris
- 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
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.
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.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel