Discussion:
G91 G28 Z0
(too old to reply)
vinny
2005-10-26 02:10:29 UTC
Permalink
Been ending programs like that for years, except now I'm doing the
renishaw probe deal on the mills, so everything is ran a bit differently.
Lately Iv'e ran into instances where I'm in incrimental when I go back to
the main program due to the G91 near the end. Never had to think about it
before, but now I'm wondering why I'm using G91 at all.
Why not G28 Z0?

Why am I using G91 G28 Z0?

I remember having the reason explained to me 20 years ago, but I was
proberbly not listening or just plain forgot??

Anybody got any input on this?
Michael Rainey
2005-10-26 02:24:30 UTC
Permalink
Found at www.cncci.com





G28, Fanuc's zero return command, tends to be one of the more misunderstood
Fanuc programming words. The zero return position is, of course, the
machine's reference position. A light (axis origin light) will come on for
each axis that is sent to the zero return position. The zero return position
is quite important: most programs begin from this location, most machines
require that you (manually) send the machine to this position as part of
powering up, and it's a point of reference for fixture offset (machining
centers) and geometry offset (turning centers) entries. Admittedly, G28 is
among the most complicated programming words. Here we attempt to clear up
the confusion.

G28 is a two-step command. In a way, it's like a canned cycle. Two things
will happen whenever a G28 is commanded. First the machine will move (at
rapid) the axis or axes included in the G28 command to an intermediate
position. Then the machine will rapid the axis or axes to the zero return
position. At this point the related axis origin light/s will come on. By the
way, if you have the single block switch on, you actually have to press the
cycle start button twice to complete the G28 command - once for the
intermediate position move, and a second time for the move to the zero
return position.

The intermediate position is what confuses most people. In absolute mode,
which most programmers prefer for general purpose programming, the
intermediate position is specified relative to program zero. In incremental
mode, it is specified relative to the tool's current position. Maybe the
best way to gain an understanding is to give a few examples.

For machining centers:
Consider this command.

a.. G91 G28 Z0
In step one of G28, the tool will move to an intermediate position that is
incrementally nothing (zero) from its current position in Z. In step two, it
will go to the zero return position in Z (only). Note that X and Y will not
move. For all intents and purposes, we're telling the machine to move the
tool straight to its zero return position in Z.

a.. G91 G28 X0 Y0 Z0
In step one of G28, the tool will move to an intermediate position that is
incrementally nothing (zero) from its current position in X, Y, and Z. In
step two, it will go to the zero return position in X, Y, and Z (together).
For all intents and purposes, we're telling the machine to move the tool
straight to its zero return position in X, Y, and Z.

a.. G91 G28 X0 Y0 Z3.0
In step one of G28, the tool will move to an intermediate position that is
incrementally nothing (zero) from its current position in X, Y. But in Z, it
will move up three inches. Maybe the tool is in a pocket you need to clear
before moving in X and Y. In step two, it will go to the zero return
position in X, Y, and Z (together).

Watch out! Here's what can happen in absolute mode. Consider this command.

a.. G28 X0 Y0 Z0
Assuming the machine is currently in absolute mode (G90), step one of G28
tells the machine to move to the program zero point (probably a crash).
Then, in step two, the machine will move to the zero return position (if it
still can).

Some programmers don't like to program (ever) in incremental mode. While I
don't consider using the incremental mode with G28 to be straying too far
from absolute programming, there is a way to stay in the absolute mode when
using G28. Consider these commands.

a.. G90 G00 X1.0 Y1.0 (Rapid to hole position)
b.. G01 Z-0.5 F5.0 (Drill hole)
c.. G00 Z0.1 (Rapid out of hole)
d.. G28 Z0.1 (First, stay right where you are in Z, then go to the zero
return position in Z)
While this works, I don't like it. I show it just for the sake of
explanation. Essentially, we're looking back in the program to the tool's
last absolute position so we can include it in the G28 command. Again, this
does work, but someday you'll probably change a tool's last position. In
this case you better also remember to change the related G28 command or
you'll be in for a big surprise!

For turning centers:
Consider this command.

a.. G28 W0
In step one of G28, the tool will move to an intermediate position that is
incrementally nothing (zero) from its current position in Z. In step two, it
will go to the zero return position in Z (only). Note that X will not move.
For all intents and purposes, we're telling the machine to move the tool
straight to its zero return position in Z.

a.. G28 U0 W0
In step one of G28, the tool will move to an intermediate position that is
incrementally nothing (zero) from its current position in X and Z. In step
two, it will go to the zero return position in X Z (together). For all
intents and purposes, we're telling the machine to move the tool straight to
its zero return position in X and Z.

a.. G28 U3.0 Z0
In step one of G28, the tool will move to an intermediate position that is
incrementally nothing (zero) from its current position in Z. But in X, it
will increase in diameter by three inches (1.5 inch move). Maybe the tool is
below an obstruction (like a tailstock) you need to clear before moving in
Z. In step two, it will go to the zero return position in X Z (together).

Watch out! Here's what can happen in absolute mode. Consider this command.

a.. G28 X0 Z0
Note that now we're commanding G28 in absolute mode. Step one of G28 tells
the machine to move to the program zero point (probably a crash). Then, in
step two, the machine will move to the zero return position (if it still
can).

Some programmers don't like to program (ever) in incremental mode. While I
don't consider using the incremental mode for G28 to be straying too far
from absolute programming, there is a way to stay in the absolute mode when
using G28. Consider these commands.

a.. G00 X3.2 Z0.005 (Rapid to facing position)
b.. G01 X-0.06 F0.012 (Face part)
c.. G00 Z0.1 (Retract in Z)
d.. X3.2 (Retract in X)
e.. G28 X3.2 Z0.1 (First, stay right where you are in X and Z, then go to
the zero return position in X and Z)
While this works, I don't like it. I show it just for the sake of
explanation. Essentially, we're looking back in the program to the tool's
last absolute position so we can include it in the G28 command. Again, this
does work, but someday you'll probably change a tool's last position. In
this case you better also remember to change the related G28 command or
you'll be in for a big surprise!

What about G53?
Most current model Fanuc and Fanuc-compatible controls allow G53 - movement
relative to the zero return position. For machining centers that allow G53,
the command

G53 X0 Y0 Z0

will send the machine (at rapid) straight to the zero return position in X,
Y, and Z. Unfortunately, older controls do not allow G53. Since G28 works on
all Fanuc and Fanuc-compatible controls, most programmers prefer to use the
(complicated) G28 command so they can run their programs on all machines
their company owns.
Billy K.
2005-10-28 23:32:16 UTC
Permalink
Post by Michael Rainey
Found at www.cncci.com
Nice Post , and very well explained...

Billy K..
Bill Roberto
2005-10-26 13:03:16 UTC
Permalink
This post might be inappropriate. Click to display it.
Cliff
2005-10-26 13:06:21 UTC
Permalink
On Wed, 26 Oct 2005 13:03:16 GMT, Bill Roberto
Post by Bill Roberto
End your operations like this
You have fixture offsets & suchlike in there?
--
Cliff
alphonso
2005-10-26 18:12:51 UTC
Permalink
Post by Cliff
You have fixture offsets & suchlike in there?
G28 doesn't care about fixture offsets because it is sending the axi to the
MACHINE'S zero reference point. It is up to the programmer/operator to get
the tools clear of the work/fixtures before calling G28.

This is the way I end all my Fanuc programs.

N230 G28 G40 G91 Z.0 M09
N240 G28 Y.0
N250 G90
N260 M30
--
Remove "nospam" to get to me.
PrecisionMachinisT
2005-10-27 02:30:50 UTC
Permalink
Post by Cliff
On Wed, 26 Oct 2005 13:03:16 GMT, Bill Roberto
Post by Bill Roberto
End your operations like this
You have fixture offsets & suchlike in there?
Doesn't matter.......g28 defines a definate machine coordinate location--if
anything, only the scales reading will reflect any compensated axis data.

--

SVL
Matt Stawicki
2005-10-26 15:44:43 UTC
Permalink
On Wed, 26 Oct 2005 13:03:16 GMT, Bill Roberto
Post by Bill Roberto
Post by vinny
Been ending programs like that for years, except now I'm doing the
renishaw probe deal on the mills, so everything is ran a bit differently.
Lately Iv'e ran into instances where I'm in incrimental when I go back to
the main program due to the G91 near the end. Never had to think about it
before, but now I'm wondering why I'm using G91 at all.
Why not G28 Z0?
Why am I using G91 G28 Z0?
I remember having the reason explained to me 20 years ago, but I was
proberbly not listening or just plain forgot??
Anybody got any input on this?
If you program a G28 Z0 in absolute the tool rapids to your Z0 program
position (top or bottom of part depending where your Z0 is) then it goes
home. If you program it in G91 the tool rapids home from wherever it is,
.......
G0 Z1. M9
G91 G28 Z0
G90
M1
.......
G0 Z1. M9
G91 G28 Z0
G28 X0 Y0
G90
M30
On my Tornos, G28 Z0 will send the spindle, or counter spindle,
(depending on whether you're programming head 1 or head 2), to the
machine Zero point, which is also the program zero point, which is at
the face of the guide bushing. WaLaa..... insta crash!

G28 W0 will send the spindles to their reference point (zero return),
with no hesitation.

Matt
Bryce
2005-10-26 16:30:25 UTC
Permalink
On Wed, 26 Oct 2005 15:44:43 GMT, Matt Stawicki
Post by Matt Stawicki
On my Tornos, G28 Z0 will send the spindle, or counter spindle,
(depending on whether you're programming head 1 or head 2), to the
machine Zero point, which is also the program zero point, which is at
the face of the guide bushing. WaLaa..... insta crash!
G28 W0 will send the spindles to their reference point (zero return),
with no hesitation.
Matt
You beat me to it Matt, it's the same on our Tsugami screw machines.
"U" is an incremental X move, "V" is an incremental Y move, and "W" is
an incremental Z move. W is very handy for sliding headstock
machines, because there are times when you just want to move .020" in
a particular direction, and figuring out exactly where the Z axis
position is presents a headache. So you can just use G0 W-.020 (or G0
W.020 depending on the polarity of your Z axis), and your headstock is
guaranteed to move .020" away from your tool. I also always use G28
U0 to center the X axis of the main spindle gang tool slide.

On a side note, we recently got a brand new Gildemeister Sprint 32
sliding head machine in here (made by Gital), and the first thing that
I noticed in their sample program for us was that all the retracts to
home positions were G0 T0 X8.413 or something like that. So I made
sure everything was in a safe position, and tried a G28 U0 with
feedrate override, and the home position of the X axis is at X0 with
no tool offset, so it sent the slide all the way in instead of
retracting it out. Pretty dumb if you ask me. Now I have to remember
all the stupid dimensions of the retracted positions of all the axes.
Pretty fancy machine though.
--
Bryce

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Garlicdude
2005-10-26 18:30:21 UTC
Permalink
This post might be inappropriate. Click to display it.
Bryce
2005-10-26 21:47:37 UTC
Permalink
Post by Garlicdude
Post by Matt Stawicki
On my Tornos, G28 Z0 will send the spindle, or counter spindle,
(depending on whether you're programming head 1 or head 2), to the
machine Zero point, which is also the program zero point, which is at
the face of the guide bushing. WaLaa..... insta crash!
G28 W0 will send the spindles to their reference point (zero return),
with no hesitation.
Matt
Matt, The G91 command puts the control in incremental mode, so G91 Z0
tells the control not to move any in Z and the G28 says go to the
reference zero. The control needs to see a "move" command on the axis
you want to send home, even if it's an imaginary one.
Least that's the way it was explained to me for my Fanuc controls.
As always YMMV
Steve
The "W" specifies that the value following it is an incremental Z
amount. It is non-modal. So if you leave it in G90 absolute mode,
and use a G28 W0, it moves an incremental distance of 0 and then sends
the Z axis home. That way you don't have to ever wonder if you are in
absolute or incremental. I use it for normal rapid and feedrate moves
also, so I don't have to switch back and forth between G90 and G91.
In fact, I don't ever use G91. "U" for X, "V" for Y, and "W" for Z.

G01 U.5 is the same as G91 X.5
G00 V1.00 is the same as G91 G00 Y1.00
G01 W-.002 is the same as G91 G01 Z-.002

You just don't have to remember to put a G90 afterwards.
--
Bryce

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Bryce
2005-10-26 21:49:39 UTC
Permalink
Post by Bryce
The "W" specifies that the value following it is an incremental Z
amount. It is non-modal. So if you leave it in G90 absolute mode,
and use a G28 W0, it moves an incremental distance of 0 and then sends
the Z axis home. That way you don't have to ever wonder if you are in
absolute or incremental. I use it for normal rapid and feedrate moves
also, so I don't have to switch back and forth between G90 and G91.
In fact, I don't ever use G91. "U" for X, "V" for Y, and "W" for Z.
G01 U.5 is the same as G91 X.5
G00 V1.00 is the same as G91 G00 Y1.00
G01 W-.002 is the same as G91 G01 Z-.002
You just don't have to remember to put a G90 afterwards.
Forgot most importantly that YMMV.
--
Bryce

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Cliff
2005-10-26 23:26:14 UTC
Permalink
Post by Bryce
The "W" specifies that the value following it is an incremental Z
amount. It is non-modal. So if you leave it in G90 absolute mode,
and use a G28 W0, it moves an incremental distance of 0 and then sends
the Z axis home. That way you don't have to ever wonder if you are in
absolute or incremental. I use it for normal rapid and feedrate moves
also, so I don't have to switch back and forth between G90 and G91.
In fact, I don't ever use G91. "U" for X, "V" for Y, and "W" for Z.
This would tend to violate the standards for word address
& axes nomenclature <G>.
--
Cliff
D Murphy
2005-10-27 03:13:11 UTC
Permalink
Post by Cliff
Post by Bryce
The "W" specifies that the value following it is an incremental Z
amount. It is non-modal. So if you leave it in G90 absolute mode,
and use a G28 W0, it moves an incremental distance of 0 and then sends
the Z axis home. That way you don't have to ever wonder if you are in
absolute or incremental. I use it for normal rapid and feedrate moves
also, so I don't have to switch back and forth between G90 and G91.
In fact, I don't ever use G91. "U" for X, "V" for Y, and "W" for Z.
This would tend to violate the standards for word address
& axes nomenclature <G>.
It's a lathe.
--
Dan
unknown
2005-10-27 03:25:11 UTC
Permalink
Post by D Murphy
Post by Cliff
Post by Bryce
The "W" specifies that the value following it is an incremental Z
amount. It is non-modal. So if you leave it in G90 absolute mode,
and use a G28 W0, it moves an incremental distance of 0 and then sends
the Z axis home. That way you don't have to ever wonder if you are in
absolute or incremental. I use it for normal rapid and feedrate moves
also, so I don't have to switch back and forth between G90 and G91.
In fact, I don't ever use G91. "U" for X, "V" for Y, and "W" for Z.
This would tend to violate the standards for word address
& axes nomenclature <G>.
It's a lathe.
--
Dan
Cant wait for the rsponse to this......

Regards
Daveb
D Murphy
2005-10-27 03:38:47 UTC
Permalink
Post by unknown
Post by D Murphy
On Wed, 26 Oct 2005 14:47:37 -0700, Bryce
Post by Bryce
The "W" specifies that the value following it is an incremental Z
amount. It is non-modal. So if you leave it in G90 absolute mode,
and use a G28 W0, it moves an incremental distance of 0 and then
sends the Z axis home. That way you don't have to ever wonder if
you are in absolute or incremental. I use it for normal rapid and
feedrate moves also, so I don't have to switch back and forth
between G90 and G91. In fact, I don't ever use G91. "U" for X, "V"
for Y, and "W" for Z.
This would tend to violate the standards for word address
& axes nomenclature <G>.
It's a lathe.
--
Dan
Cant wait for the rsponse to this......
Same here. Unfortunately I don't have time for it this week. But I could
give Cliff the parameter to change so it will program just like 1972.
--
Dan
Cliff
2005-10-27 08:52:11 UTC
Permalink
Post by unknown
Post by D Murphy
It's a lathe.
Cant wait for the rsponse to this......
[
Post by unknown
Been ending programs like that for years, except now I'm doing the
renishaw probe deal on the mills, so everything is ran a bit differently.
]

Enjoy <VBG>.
--
Cliff
Bryce
2005-10-27 17:07:45 UTC
Permalink
Post by Cliff
Post by unknown
Post by D Murphy
It's a lathe.
Cant wait for the rsponse to this......
[
Post by unknown
Been ending programs like that for years, except now I'm doing the
renishaw probe deal on the mills, so everything is ran a bit differently.
]
Enjoy <VBG>.
Obviously, Dan meant that the machine I was talking about was a lathe,
(thanks Dan) as well as the machine Matt was referring to. Sorry I
didn't start a new thread to avoid confusion. I suppose your point
being that the OP was talking about a mill, and so was Steve.

As far as mills go, I always use a G00 G53 Z0 instead of a G91 G28 Z0.
Is this common? Any occasions where G53 would not be ideal? It is
non-modal, and does not require switching between absolute and
incremental. Anybody have any input?
--
Bryce

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Cliff
2005-10-27 08:51:15 UTC
Permalink
Post by D Murphy
Post by Cliff
Post by Bryce
The "W" specifies that the value following it is an incremental Z
amount. It is non-modal. So if you leave it in G90 absolute mode,
and use a G28 W0, it moves an incremental distance of 0 and then sends
the Z axis home. That way you don't have to ever wonder if you are in
absolute or incremental. I use it for normal rapid and feedrate moves
also, so I don't have to switch back and forth between G90 and G91.
In fact, I don't ever use G91. "U" for X, "V" for Y, and "W" for Z.
This would tend to violate the standards for word address
& axes nomenclature <G>.
It's a lathe.
[
Post by D Murphy
Been ending programs like that for years, except now I'm doing the
renishaw probe deal on the mills, so everything is ran a bit differently.
]
--
Cliff
Bill Roberto
2005-10-27 01:01:15 UTC
Permalink
Post by Cliff
On Wed, 26 Oct 2005 13:03:16 GMT, Bill Roberto
On my Tornos, G28 Z0 will send the spindle, or counter spindle,
(depending on whether you're programming head 1 or head 2), to the
machine Zero point, which is also the program zero point, which is at
the face of the guide bushing. WaLaa..... insta crash!
G28 W0 will send the spindles to their reference point (zero return),
with no hesitation.
Matt
Mills process incremental moves different from lathes. On lathes X,Y,Z,C
are U,V,W, and H. On mills you toggle it incremental by proceeding the
axis with a G91 X,Y,Z. To toggle it back to absolute G90 X,Y,Z. Most
mills won't recognize U,V,W or H.
DrFrye
2005-10-29 22:28:49 UTC
Permalink
Yeah. Why is this so? I think it would be handy to make a non-modal
incremental move now and then.

Dale
Post by Bill Roberto
Post by Cliff
On Wed, 26 Oct 2005 13:03:16 GMT, Bill Roberto
On my Tornos, G28 Z0 will send the spindle, or counter spindle,
(depending on whether you're programming head 1 or head 2), to the
machine Zero point, which is also the program zero point, which is at
the face of the guide bushing. WaLaa..... insta crash!
G28 W0 will send the spindles to their reference point (zero return),
with no hesitation.
Matt
Mills process incremental moves different from lathes. On lathes X,Y,Z,C
are U,V,W, and H. On mills you toggle it incremental by proceeding the
axis with a G91 X,Y,Z. To toggle it back to absolute G90 X,Y,Z. Most mills
won't recognize U,V,W or H.
PrecisionMachinisT
2005-10-27 02:28:04 UTC
Permalink
Post by Bill Roberto
If you program a G28 Z0 in absolute the tool rapids to your Z0 program
position (top or bottom of part depending where your Z0 is) then it goes
home. If you program it in G91 the tool rapids home from wherever it is,
therby not causing you to shit your pants.
Which, (in the case of our 4 axis horizontal and with no length comp active)
brings the spindle gage line into a position at the pallet rotational
centerline......

Definitely a very, very unfortunate turn of events.

--

SVL
Dave Gee
2005-10-27 06:38:47 UTC
Permalink
Throw in an M10 B0. and you could have some REAL fun!
vinny
2005-10-29 08:07:03 UTC
Permalink
Post by vinny
Been ending programs like that for years, except now I'm doing the
renishaw probe deal on the mills, so everything is ran a bit differently.
Lately Iv'e ran into instances where I'm in incrimental when I go back to
the main program due to the G91 near the end. Never had to think about it
before, but now I'm wondering why I'm using G91 at all.
Why not G28 Z0?
Why am I using G91 G28 Z0?
I remember having the reason explained to me 20 years ago, but I was
proberbly not listening or just plain forgot??
Anybody got any input on this?
OK....Let me see if I got this strait...

So After reading all the replies, I get differerent reasons on different
controls.
Being on a haas...you guys are basically saying G28 does 2 things, moves to
the position specified for an axis and then homes that axis.
So by using "G91 G28 Z0" the first part of G28says go nowhere
incrimentally then home Z.
Using "G28 Z0" says go to Z0 first, then home Z.

Problem is.....what if the zero is below you, as in the case of model
machining, and especially 4th axis work where zero is the centerline of the
4th axis rotary.

See I knew there was a good reason. G91 G28 ZO it stays!

Thanks, now I can tell the apprentice why its G91, unless he's already
reading this newsgroup.
Loading...