Hello Guest it is August 07, 2020, 12:19:46 AM

Author Topic: 4th Axis - How do I constantly rotate it?  (Read 10273 times)

0 Members and 1 Guest are viewing this topic.

4th Axis - How do I constantly rotate it?
« on: March 16, 2009, 08:34:48 PM »
 just added a 4 axis to my system.  This axis is a rotary head / divider.
I want to turn it on so that it continues to rotate at a constant speed while Mach3 runs my program (g-code).
In other words I want to use the rotary head like a lathe head.   
So how do I program the 4th axis to turn on at the beginning of my g-code file, then turn off at the end?

Any suggestions?  Thanks.

Offline ger21

*
  • *
  •  6,282 6,282
    • View Profile
    • The CNC Woodworker
Re: 4th Axis - How do I constantly rotate it?
« Reply #1 on: March 16, 2009, 08:58:38 PM »
Make a separate profile and set it up as a spindle.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: 4th Axis - How do I constantly rotate it?
« Reply #2 on: March 17, 2009, 09:03:43 AM »
I like that idea.  So last night I tried it.

Now my next question is.....can you use a stepper motor as a spindle?

I read my mach3 manual and went through all the steps.  And after some time I finally got the stepper (4th axis) to turn using it as a spindle.
However it was very slow and harsh sounding, and there was no speed control, it was either on or off.
It's as if the stepper was just receiving the wrong pulses.

So what do you think I am missing?  All my other motors set up without a hitch, and my 4th axis works fine when not used as a spindle.

Any help would be great.

Offline ger21

*
  • *
  •  6,282 6,282
    • View Profile
    • The CNC Woodworker
Re: 4th Axis - How do I constantly rotate it?
« Reply #3 on: March 17, 2009, 11:29:47 AM »
Try using an S********* in the MDI to set the speed. S500 for 500 rpm.

You can add that to your g-code to automate it.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: 4th Axis - How do I constantly rotate it?
« Reply #4 on: March 17, 2009, 03:18:10 PM »
Have you set the correct steps per unit? Not sure what the velocity should be set as, manual says Revs per Second however with the SmoothStepper it is Revs per Min for a Step/Dir spindle so it could be the same for normal PP operation.
Hood

Offline GaryB

*
  •  108 108
    • View Profile
Re: 4th Axis - How do I constantly rotate it?
« Reply #5 on: March 17, 2009, 09:50:10 PM »
I would set it up as an A-Axis, that way you get full control under code just like your X, Y, and Z-axis plus it will allow you to run as a rotary or an indexer and finally you can add to your post processor to generate code.
just my 2 cents
Beckwith Decor Products
ArtCam Trainer
Onsrud & Custom CNC tooling Distributor

Wichita/Derby Kansas
http://www.beckwithdecor.com

Offline Greolt

*
  •  956 956
    • View Profile
Re: 4th Axis - How do I constantly rotate it?
« Reply #6 on: March 17, 2009, 09:58:34 PM »
JonnyElectronny said

"I want to turn it on so that it continues to rotate at a constant speed while Mach3 runs my program (g-code)."

How do you do that if it is set as A axis?

Greg
Re: 4th Axis - How do I constantly rotate it?
« Reply #7 on: March 19, 2009, 09:14:03 AM »
Thanks for the input guys.

It seems as if I haven't found the correct settings to use a stepper as a spindle. 
I have tried different values in the MDI using "S*********" 
I have played with every posible variable imaginable.
The best I can get is a heavy pulse to my stepper about once every half second.
I have set my steps per unit, velocity, out puts, I have played with spindle speeds etc.

Under setup - spindle setup - motor control - I changed to "PWM control" and my stepper started to turn, but only at one speed (slow) and the pulses where very harsh and heavy sounding.
I also got a reverse this time. But I think that "PWM control" if for servo motors.

I am so close, I just feel as if I am missing one step.  My stepper works very well set up as an a-axis, just wish it would set up as well as a spindle.

 

BClemens

*
Re: 4th Axis - How do I constantly rotate it?
« Reply #8 on: March 19, 2009, 04:15:07 PM »
Someone clarify this! Why do you need to set the forth axis ('A' in this case) up as a spindle to have it rotate? 'A' can be used for anything but isn't the forth axis ('A') rotation in the X axis (or 'Y')? When someone needs to have 'A' axis rotate, what is the proper method in Mach3?

Sorry for the thick spot but this makes no sense at all.....It appears that there are a couple of explanations going on here.

Bill C.

Offline Hood

*
  •  25,846 25,846
  • Carnoustie, Scotland
    • View Profile
Re: 4th Axis - How do I constantly rotate it?
« Reply #9 on: March 19, 2009, 04:33:58 PM »
Bill
 the OP wants to have the axis constantly roatating so if he used the 4th axis as a normal 4th then he would have to command an A move on every single line of code. Maybe he doesnt need it constantly rotating but I suspect he may be wanting to use it as a lathe. You could of course use the 4th axis as a true 4th for lathe type work but that mean lots of calculations for each move, well as far as I can see.



Jonny
 Please attach your xml.

Hood