# Thread: X & A, possibly Z simultaneously?

1. ## X & A, possibly Z simultaneously?

I have a small mill (A2ZCNC) with a Sherline rotary table vertically mounted so axis is parallel with X or horizontal (now that makes me unsure of what this axis is correctly referred to). Anyway tonight I was playing with some manually written G code and lowering the z and then moving the X back and forth, retract Z, rotate the A 60 degrees (or whatever that axis is called, I do call it A in my code) and basically repeat. It gives me a wrench flat and or flat sides down a otherwise round bar.
That got me starting to think about how a ballscrew is made. I see it as
Drop Z to first cut depth at starting point of X.
Engage A and X at the same time (this is where my question lies). If I wanted A to rotate 720 degrees over the next 2" of X travel. One of the feedrates are going to override the other, right? Purely a hypothetical measurement not a real ballscrew. It really gives me a little more possibility with a wee little Sherline. Almost like a lathe with a milling head.
I really think it would allow for some interesting twists in bar stock with out using the lathe.
The other cool thing was that I could perform quite a few more functions without ever taking the part out. Similar to Simpson36's(?) machine making hose barbs.
So how would I write that? ( 1 full rotation of A while X is traveling 1" and Z is fixed)
Anyway any tips would be great.

2. Simultaneous control is possible if you have a 4-axis control.
You use G01 only, with all four axis distances/angle.
Feedrate of rotary axis ("A" is parallel to X, "B" parallel to Y and "C" parallel to Z. So, you have A-axis on your machine) is in deg/min, if commanded separately.
If you use a linear axis as well as a rotary axis in G01 (as in your case), the commanded feedrate would be along the tangential direction of tool movement, i.e., along the spiral toolpath.
This way you can generate a uniform pitch. If you need a complex contour, defined by lines/arcs, on the circumference, you need to have cylindrical interpolation available on your machine.

3. sinha, Thanks for the response. I do have 4 axis available. Maybe I am understanding you on how to use G01. I was under the impression that "A's" feedrate was overriden by "X's" and it appears it is. So can I write it like this?
G01 Z0 F1 (clear of workpiece)
G01 X0 F6 (starting point of X)
G01 A0 F360 (starting point of A)
G01 Z-.0125 A720 X2.25 F6 (would this plunge the Z in .0125, rotate 2 revolutions while starting at X0 and traveling to X2.25? Would it cut a spiral along the X axis with 2 revolutions over 2.25"?)

4. Simultaneous movement of all axes takes place so as to reach the programmed end point of each axis at the same time.
So, it will cut a spiral, proceeding in Z-direction also, as X increases.