PDA

View Full Version : G28 - how to give z axis priority

jderou
10-31-2005, 03:51 PM
When I perform a G28 to move home from a current work offset, all axis move in a straight line home. This doesn't seem like a very safe path, I would rather the z home first then x,y. Is it possible to do this using G28? adding axis numbers after the command doesn't seem to do anything.

Al_The_Man
10-31-2005, 04:00 PM
G28 can be programmed in absolute or incremental, if you program in absolute and specify axis positions after the G28 the axis should travel through that point before proceeding to home position.
Al.

Geof
10-31-2005, 05:17 PM
Rather than just using a G28, use G53 Z0.0 which will take the Z to 0. in the machine coordinates, then G28 or G53 X0. Y0. to take these home.

ger21
10-31-2005, 06:16 PM
Try:

G28.1 Z0
G28.1 X0 Y0

Dan Fritz
10-31-2005, 06:34 PM
Here's a little known fact about G28:

G28 is really "Go home via an intermediate point". The intermediate point is programmed with the X, Y, and Z values. Most people use G91G28X0Y0Z0 to make a full automatic zero-return motion. That motion is really:

1) In incremental, move X0 Y0 Z0 (no motion)
2) Go to the zero return in all 3 axes.

If you use G90, you can specify any point you like as the intermediate point, including a point well clear of your work in Z. For example, G90G28X10.Y5.Z7. will do this:

1) Move in rapid to X10.0000 Y5.0000 and Z7.0000
2) Go to the zero return in all 3 axes

G28 only homes out the axes that are specified in that same block, so you can do it two or more steps, like:

G91G28Z0 (go home in Z only)
G28X0Y0 (go home in X and Y)

Hope this helps.

HuFlungDung
10-31-2005, 06:46 PM
Dan,
Question for you (or other knowledgable person): on the intermediate G28 coordinate, is that understood to be a coordinate in the current work offset coordinate system, or in the G53 coordinate system?

ger21
10-31-2005, 06:49 PM
G28 only homes out the axes that are specified in that same block, so you can do it two or more steps, like:

G91G28Z0 (go home in Z only)
G28X0Y0 (go home in X and Y)

Hope this helps.

Not in Mach3. Use G28.1 as I described above.

Geof
10-31-2005, 07:00 PM
Dan,
Question for you (or other knowledgable person): on the intermediate G28 coordinate, is that understood to be a coordinate in the current work offset coordinate system, or in the G53 coordinate system?

I don't know if I meet your full criteria; I know I am not a Dan and have doubts sometimes about the other.

The intermediate point is in the currently active work coordinate system; G53 is non-modal so it does not carry into a subsequent block and G53 G28 is not permitted.

ger21
10-31-2005, 07:00 PM
Dan,
Question for you (or other knowledgable person): on the intermediate G28 coordinate, is that understood to be a coordinate in the current work offset coordinate system, or in the G53 coordinate system?

In Mach3, according to the manual, it's G53 coordinates.

Edit. After playing around a little, this may not be correct. Tha manual is a bit vague. :)

Dan Fritz
10-31-2005, 07:49 PM
My comments on G28 pertain to the Fanuc controls. Other brands may behave differently.

From my understanding of the G28 intermediate point, it's just like making a G00 move to the intermediate point, then performing a zero return. The absolute postion would be in whatever coordinate system is currently active. G28 was around about twenty years before the G54-G59 coordinate system option.

I'll check my documentation and see if there's any mention of cancelling the coordinate system when you make the intermediate move.

Geof
10-31-2005, 08:22 PM
My experience with G28 and specifying the intermediate point is that it is risky if you are prone to typos. G28 just by itself takes all axes straight home. On some machines, Haas for example, the manufacturer has the common sense to run Z home first then X and Y together. You can run one axis home but if you specify a single axis it has to X, Y, or Z something and the something becomes the intermediate point. So you use G91 G28 Z0. and you do not move then go home. And if you put in a typo; G90 G28 Z0. and that position in your current work coordinate system happens to be lower than what is beneath your tool at that position, such as a close tolerance fixture, you have problems. G28 is functionally equivalent to G53 G00 X0. Y0. Z0. and G53 G00 Z0. is equivalent to G91 G28 Z0. and in some ways safer.

Added comment: I overlooked to mention that Tool Length Compensation has to be cancelled first (G49) when using G53.

jderou
11-01-2005, 08:50 AM
Wow, all kinds of info. What I was doing was G28 Z0, this still took all axis straight home. Will adding a G91 do it? its apparent their are all kinds of ways to do this, problem is how do I get mastercam to output in this format. I have problems getting the mastercam post to do what I want it to. I make changes but the post doesn't reflect them. Off topic a bit though.
Thanks

Joe

Dan Fritz
11-01-2005, 09:01 AM
If you were giving the machine a G28Z0 and that took all 3 axes home, then you must not be running a Fanuc, Yasnac, or similar control.

What kind of control DO you have ?

ger21
11-01-2005, 09:08 AM
Dan, he's using Mach3, check the forum this thread is in. :)

Joe, read my posts above. Use G28.1 Z0, then G28.1 X0 Y0

jderou
11-01-2005, 02:31 PM
Thanks Gerry, I will try that.

jderou
11-03-2005, 09:02 AM
Well I tried G28.1, it still sent all axis straight home! G53 works well though, and I was able to manually modify my post to use this instead of G28.

thanks all!

ger21
11-03-2005, 09:06 AM
You have to do it twice
G28.1 Z0
G28.1 X0 Y0

I have a Mach3 running in simulation mode, and it works fine that way for me.

jderou
11-04-2005, 09:01 AM
Strange, I was using it in Mach 2 though, maybe its different. As soon as I tried G28.1 Z0.0, all axis went home.