What's new
What's new

Incremental Rotary Axis Code for Subspindle - Fanuc-Takisawa LA250YS Lathe

Joined
Mar 20, 2023
Trying to figure out what code would enable incremental C axis motion on a Fanuc 32i-Model B controlled lathe. The sub-spindle rotary axis and the code I use to move it is "A" and the main spindle uses "C" for it's rotary axis.

Example code below activates, homes, and moves the rotary axis to zero on the main spindle, then goes back into turning mode for the main spindle:
M76(MAIN SPINDLE MILLING MODE)
G0G28H0
G0G54C0
...
M75(MAIN SPINDLE TURNING MODE)

This code activates, homes, and moves the rotary axis to zero on the sub spindle, then goes back into turning mode for the sub spindle:
M71(SUB SPINDLE MILLING MODE)
G0G28A0
G0G55A0
...
M70(MAIN SPINDLE TURNING MODE)

Using an "H" address when M71 is active results in a "P0224 ZERO RETURN NOT FINISHED" alarm.

I would like the incremental commands in order to simplify hand-programming, which is how I program almost everything on my lathe (not happy with available post processors for Fusion, and I haven't got around to customizing my own yet). Another benefit to using incremental commands is to allow me to turn the rotary axis more than 180° with a single line of code. For example, when at C0 on the main spindle, G1C360. doesn't result in any movement, but G1H360. results in one full rotation of the rotary axis.

Thanks for any input you might have!
 
Well, I don't have any "C2" axi's on a single path controller, so I have no experience on this, but I would think that if you are looking for the INCR letter for C2 (A?) you should be able to simply hit your POS button a cpl of times to get to the INCR value page, and just see what C2 (A) shows there.

I've never had any reason to use G28 on C before.
Not sure why you doo that?


-----------------------

Think Snow Eh!
Ox
 
Well, I don't have any "C2" axis on a single path controller, so I have no experience on this, but I would think that if you are looking for the INCR letter for C2 (A?) you should be able to simply hit your POS button a cpl of times to get to the INCR value page, and just see what C2 (A) shows there.

I've never had any reason to use G28 on C before.
Not sure why you do that?


-----------------------

Think Snow Eh!
Ox
Going to the relative screen on the control is a good idea I didn't think of; however, it only shows X, Z, C, and Y as changing to U, W, H, and V. Axes A, B, and T (turret axis, kind of irrelevant but whatever), all remain the same.

On this control/machine, the rotary axis must be homed before positioning. I also run older ('04 - '11) Mori Seiki NL1500SY machines, and they do not require the G28 H0 line, but if the rotary axis has not been homed since it was engaged, the Moris automatically home those axes. As a side note, Mori Seiki, and I assume now DMG Mori, neatly get around this problem by using C and H for both the main and sub spindle, but by using M45 to activate the main spindle C-axis mode, and M245 to activate the sub-spindle C-axis.
 
I guess that's not too hard to believe that the machine doesn't have an INCR value for "A".
We just talked about that this last week in another thread.

Doo to this fact, you may not have an INCR letter for such.
IDK how this would work - never tried - but have you tried G91 A360.?

I am purty sure that Sir William will tell us that is not possible w/o changing the lay-out of the control from Type A to Type B or something like that, but until he squorshes that thought like a bug, you could try it...

Again, anything that I have with a C2 axis - all have dual or trippple path controls, and so it programs as normal.
There has GOT to be many others out there with C subs that run single path controllers, but again - just how often doo you want to doo what you are asking - let alone on the sub?

Good luck - and let us know if you find a werk-around!


----------------------

I am Ox and I approve this post!
 
Last edited:
G91 doesn't work on lathes as on mills. Anytime it's tried, an "improper G-code alarm" is displayed. But just in case I have a preexisting bias, I tried it out and it threw the same alarm. I saw a thread discussing the "B" axis, which is really a linear sub-spindle axis, which I also haven't found an incremental code for, and am pretty sure none exists.

The work-around for programmed parts that require greater than 180° rotary motion in a single movement is to split that movement into multiple lines that move less than 180°. However, I do have a few programmed parts where a single spiraling move requires 3 full rotations of the "C" axis, so that's a bit annoying to go from a single line of code (G1Z-5.A1080.F1300.) to 9 lines of code (120° split).

It is a fair point that this is not a common problem, but I'm trying to figure it out before it bites me when I'm in the middle of production.
 
  • Like
Reactions: Ox
I don't recall the part(s?), but I have used the H value for long helix's as you say.

So, you can git to 360.000 if you start at C240.?
And then the next line is C120. from there - which ultimately gits you to C480 via the correct direction?


----------------

Think Snow Eh!
Ox
 
Yes, that'd be right. The three programs below will result in the same machine motion.
G1G99C0F3600.G1G99C0F3600.G1G99C0F3600.
C120.C120.C120.
C240.C240.C-120.
C360.C0.C720.
C480.C120.C1200.

The one clear advantage with this method is when you are drilling a bolt circle, there is never a need to "unwind" the C axis. For example, to spot, then drill, then tap at 4 locations 90° from one another, you could always start at C0 and never need to rapid more than 90° degrees from C270. But even if you did have to unwind the C axis, it rapids at 100 RPM so it's kind of a non-issue, and if that 0.6 seconds (or 0.45 in the example) matters to you, you should be programming spot C0-C90.-C180.-C270. drill C270.-C180.-C90-.C0 ect. which is how I always programmed on the Mori machines.
 
OK, another thing that may help you:

I guess that I'm not 100% sure how this works on a Fanuc C axis, but I know that it is an issue for deep rigid tapping on a Cinci mill:

Sometimes you can "unwind" before you start.
Like possibly if you got to C-360. and then programmed in C+360. could possibly = 720* of motion.
In the case of a helix on your "A" axis, this could help?


--------------------

Think Snow Eh!
Ox
 
I don't think so. Anytime I run an absolute rotary code (C or A) the axis moves in the direction that results in the shortest distance traveled. This includes using negative values. You wouldn't think that'd be right, but I guess it's a bit like using "R" with G2 and G3; you may have multiple options to get there in a CW/CCW arc, but the machine will always take the shortest path (except when using R-negative values, but I've not done that more than once.)
 








 
Back
Top