Hello Guest it is December 09, 2019, 03:34:37 AM

Author Topic: Mach 3 to drive a motor at fixed rpm  (Read 2535 times)

0 Members and 1 Guest are viewing this topic.

Mach 3 to drive a motor at fixed rpm
« on: January 29, 2015, 06:12:12 AM »
Hi all

I need to replace the drive motor on the cnc quilting machine i built for the wife, it doesn't have enough torque at the speed I need it to run.

What I'd like to do is use another stepper motor for the sewing machine and drive it from mach 3. I'm only using 2 axis at the moment so it would be easy to use the Z (or A) axis for this.

At the moment I do a M30 motor start to turn on the machine relay at the start of the sewing action, how do I turn on say the Z axis and leave it running until I send another motor stop command at the end of the process?

Thanks Dave

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Mach 3 to drive a motor at fixed rpm
« Reply #1 on: January 29, 2015, 12:17:40 PM »
You can't have continuous rotation on an axis (z) BUT you can on the spindle. Set up the spindle as step direction. Then use S********* to set the RPM and M3/4 to tun it ON /OFF.

(;-) TP
Re: Mach 3 to drive a motor at fixed rpm
« Reply #2 on: January 29, 2015, 08:56:23 PM »
Thanks TP

Little confused on this one..... so where do we set the parameters for the stepper motor thats effectively running the spindle?

On my router I use the spindle control to turn it off and on but thats a dedicated rotation type motor.

Thanks 

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Mach 3 to drive a motor at fixed rpm
« Reply #3 on: January 29, 2015, 09:03:47 PM »
Go to Config  /  Spindle select S/D spindle

Go to Config Ports and pins/ Motor ouputs and set up the spindle.

Go to Config/ Motor tuning and set the steps per and Vel and Accel values (make sure you save)

Shut down Mach3 and reload Mach3.

(;-0 TP
Re: Mach 3 to drive a motor at fixed rpm
« Reply #4 on: January 29, 2015, 09:48:56 PM »
Thanks

After your first reply I went back and had a look and found those settings but which axis is it connected to!

As its a stepper surely it has to be connected to one of the 4 axis drives on my Gecko 540...

Cheers

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Mach 3 to drive a motor at fixed rpm
« Reply #5 on: January 30, 2015, 12:09:06 AM »
Do you have an empty drive on the 540 ? If so that is where you set the Port and pins to to run the stepper for the spindle.

If you are only running 3 drives and have an empty slot add in the extra drive and mapp the signals to that slot. If all your drives are already used then add a 2nd LPT card and run the spindle drive from there.

(;-)TP
Re: Mach 3 to drive a motor at fixed rpm
« Reply #6 on: January 30, 2015, 12:23:46 AM »
I see now.... So I've set the Step pin, Dir pin, Step port and Dir port the same as what shows for the unused Z axis which is what I'll use.

Can i set the S*** (whatever the code is) and the M03 command to auto populate from my vcarve tool path.
Do you have an example of this code?


Once again thanks for your help.

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Mach 3 to drive a motor at fixed rpm
« Reply #7 on: January 30, 2015, 11:11:31 AM »
To start teh spindle and set the speed.

M3 S100

S200  (Change the spindle rpm)

M5    (Stop the spindle)