What's new
What's new

fanuc incremental programming questions

lwm

Aluminum
Joined
Jan 10, 2014
Location
Ontario, Canada
I have two older Takisawa lathes here. One is a Japanese made TC-20 with a Fanuc control. I'm not sure what model Fanuc it is, there are no markings on the control, other than Takisawa Fanuc. When I start it up it says DE01-05 if that means anything. The other is a Taiwan made EX-110 with a Fanuc 21i-T. I am trying to understand why the following program works as expected on the TC-20 but not on the EX-110. On the TC-20, the Z axis will feed 1 inch in the negative direction, then rapid 1 inch in the positive direction from whatever starting position I happen to be in. This is what I want. On the EX-110 the W-1.0 command does not seem to be taking effect in incremental mode, the distance to go display is always around 20". Can somebody enlighten me as to what could be going on with the EX-110?

Code:
% 
O100 (TEST DRILL)
T0101
G99 G97 S1500 M3
G0 X0.0
G01 F0.010
W-1.0
G00
W1.0
M05
%
 
Hello lwm,
Does the Z axis move the 20" if let do so?

It could be that your control is set to either G Code System B, or C. Try a short program like the following, or execute the command via MDI and observe if a p/s010 alarm is raised.

O1000
G91
M30
%

If no alarm, then either G Code System B, or C is set for your control via parameter. In this case, Absolute/Incremental Mode is selected via G90, G91 respectively. The G0 X0.0 command in your program example may work without G90 being programmed, because the Control defaults to G90 on start up.

Regards,

Bill
 
Does the Z axis move the 20" if let do so?

I believe it would, have never let it run into the chuck to find out for sure!


It could be that your control is set to either G Code System B, or C. Try a short program like the following, or execute the command via MDI and observe if a p/s010 alarm is raised.

O1000
G91
M30
%

I do get an alarm when I execute a G91, would have to verify the alarm code to be sure, but I know it says something about invalid G-code when i try to execute a G91.
 
Does it do the same thing in X if you program an incremental U?
 
In your program, you are trying to feed in what appears to be FPR mode, which is pretty normal for a lathe. Could your other lathe somehow be in IPM mode, in which at a feed of F.01 it would be moving so slowly that it would be easy to think it wasn't moving? Or could the chuck not be closed, and the machine requires that it is?
 
I finally figured out what's happening here. My Z geometry offset for tool #1 is set to -23.2839. So in order to get my tool to move 1" in the negative direction, I need to do this.
Code:
O100 (TEST DRILL)
T0101
G99 G97 S1500 M3
G0 X0.0
G01 F0.010
[COLOR="#FF0000"]W22.2839[/COLOR]
G00
W1.0
M05

Interestingly enough, the W1.0 then works as expected. Is there a parameter that could be changed to get rid of this behavior? I can't think of any good reason you would want to have it like this.
 
I am under the impression that W should always work as intended, irrespective of offset values, in G-code system A.
Is it original or emulated Fanuc?
 
I finally figured out what's happening here. My Z geometry offset for tool #1 is set to -23.2839. So in order to get my tool to move 1" in the negative direction, I need to do this.
Code:
O100 (TEST DRILL)
T0101
G99 G97 S1500 M3
G0 X0.0
G01 F0.010
[COLOR="#FF0000"]W22.2839[/COLOR]
G00
W1.0
M05

Interestingly enough, the W1.0 then works as expected. Is there a parameter that could be changed to get rid of this behavior? I can't think of any good reason you would want to have it like this.
That's weird, it's interpreting the W move as the position from abs Z0.0

I assume if you positioned the machine at Z0.0 first, W-1.0 would work fine.
 
I finally figured out what's happening here. My Z geometry offset for tool #1 is set to -23.2839. So in order to get my tool to move 1" in the negative direction, I need to do this.
Code:
O100 (TEST DRILL)
T0101
G99 G97 S1500 M3
G0 X0.0
G01 F0.010
[COLOR=#FF0000]W22.2839[/COLOR]
G00
W1.0
M05

Interestingly enough, the W1.0 then works as expected. Is there a parameter that could be changed to get rid of this behavior? I can't think of any good reason you would want to have it like this.

INCR move is INCR.
What you just described is an ABS move.


FWIW - I understand thinking in circles...



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

Think Snow Eh!
Ox
 
It's applying the Z offset on the first Z axis move.

My theory is it would do the same thing in X, if X was not positioned first:

O100 (TEST DRILL)
T0101
G99 G97 S1500 M3
G0 Z0.0
G01 F0.010
U1.0
M05

^^^ I think the U1.0 move will incorporate the X offset, and be something other than X1.0

I think that if Z is positioned first, W-1.0 would work:

O100 (TEST DRILL)
T0101
G99 G97 S1500 M3
G0 Z0.0
G01 F0.010
W-1.0
M05

^^^ Z offset is already incorporated, the INC move would be Z-1.0.

Or...

O100 (TEST DRILL)
T0100
G99 G97 S1500 M3
G0 X0.0
G01 F0.010
W-1.0
M05

^^^Geometry offset is not called, INC move would be Z-1.0.
 
Well, I finally got a solution that *mostly* does what I want it to. Thanks to SK Sinha's book on custom Fanuc programming I figured out how to read the Z offset and use that in the calculation to figure out the W command.

Code:
O99 (TEST DRILL)
T0101
G99 G97 S1500 M3
G0 X0.0 
#507 - 0-#2801-1.0  (get Z geometry offset of tool #1)
G01 W#507 F0.010
W1.0
G00
W1.0
M05

I would have to get a lot fancier yet if I wanted to automatically calculate for any tool, but we almost always run this program on tool #1 so I think this'll work for now.
 








 
Back
Top