Using G28

This forum is dedicated to those Hobbyists Interested in CNC machining & 3D Printing in their home shops. (Digital Read Outs are also topical, as is CAD/CAM as it relates to CNC)

Moderator: Harold_V

User avatar
Dave_C
Posts: 960
Joined: Mon Apr 21, 2008 10:34 am
Location: Springfield. MO.

Using G28

Post by Dave_C »

I'm in the process of getting off of BobCad Cam (for obvious reasons) and starting to work with Fusion 360!

So far I find Fusion 360 way easier to make sketches and from those sketches I extrude my models for machining, or 3D printing if I ever decide to do that.

I've see a difference in the way the two programs "park" the tool after each sequence of tool paths. BobCad Cam let you set the X and Z position, I'm on a CNC Lathe, while Fusion 360 uses the G28 command.

I'm not all that familiar with using G28 in Mach 3 and I had not set up any position for G28. It is easy to do provided you know what you are setting. It looks like G28 uses machine coordinates and not part coordinates. So when I home my machine at start up it is set to make the DRO's read the true machine position. So in my case that is about 24" from the chuck so I entered 24 as the home position. The X axis follows the same logic and registers the actual diameter of the cut with the master tool in the tool holder.

So in looking at the G-code that Fusion creates:

Fusion is making a G91 call (incremental) and on the same line the G28 call followed by a Z0 (The Line looks like this G91 G28 X0) and then the next line of code is a G90 call to go back to absolute.

With no G28 data set up in mach 3 the tool parked just off the end of the part in Z and at X=0 (Center)

So I put 24" in the G28 for Z and 2" for X (I use diameter mode so it actually parks at 4" diameter)

Now the G28 call makes the part park at the proper diameter but it still goes to Z0.

Any ideas how to make it park 10" away from the part end so I can do tool changes?

Dave_c
I learn something new every day! Problem is I forget two.
User avatar
Bill Shields
Posts: 10459
Joined: Fri Dec 21, 2007 4:57 am
Location: 39.367, -75.765
Contact:

Re: Using G28

Post by Bill Shields »

Use G28 Z<VALUE> -> value depends on where the G28 position is defined on your specific machine.


This is however generally a FIXED POINT on the machine and not relative to wherever you have the end of the part.

Typically it is measured from the face of the chuck mount face on the spindle...or on some machines it is at the limit of Z travel away from the part, or on some machines with dual spindles, it is mid-way between them.

You can also use something like G28 Z[<PART-LENGTH>+<DESIRED LOCATION>] -> ASSUMING that this does not put you outside the travel limit of the machine.

With most lathes, if you drive the turret to its outer limit, you can safely call a tool without worrying about a crash, so you can use a command to CANCEL WORK OFFSETS and TOOL OFFSETS then a G0 Z<SAFE POINT>

Note that when calling G28 you should generally also cancel the XZ tool offsets, or most controls will try to move the turret to the G28 position + any <tool-offset> value.

Depending on the machine / control, cancelling the offset is something like

T0
T00
T<CURRENT-TOOL>00

Some controls (you don't say what the machine / control are), there are also G30 commands available that you CAN relocate.

NO - you do NOT want to move the G28 position value in the control

Note: Use of G28 / G30 and /or XZ coordinates is not a function of the software (BobCAD or Fusion or xxxCAM), but controlled by the post processor that can be flavored any way you like, generally independent of the xxxCAM system driving it.
Too many things going on to bother listing them.
choprboy
Posts: 322
Joined: Sat Oct 29, 2011 11:23 pm

Re: Using G28

Post by choprboy »

As Bill said, it is going to depend on the code processor in your machine. I am probably a pretty poor source of info as Ive had very little first hand experience in it.... but Haas recently put up a video on the difference between G53 and G28 and why not to use it.

https://www.youtube.com/watch?v=Rd-h0YA9IzQ

User avatar
Bill Shields
Posts: 10459
Joined: Fri Dec 21, 2007 4:57 am
Location: 39.367, -75.765
Contact:

Re: Using G28

Post by Bill Shields »

DaveC:

if you want some machine specific help with this, please feel free to contact me at bshields at mehrs dot com

Bill
Too many things going on to bother listing them.
User avatar
Dave_C
Posts: 960
Joined: Mon Apr 21, 2008 10:34 am
Location: Springfield. MO.

Re: Using G28

Post by Dave_C »

Bill,

Your response was just what I was looking for!

Just so others will know, I am working on a DIY conversion of a Grizzly G4003G running Mach 3.

I've been into my BoCad Cam post processor as BobCad Cam did not have it working properly for the Mach 3 software. They did work with me over the phone until I got it working as it should. Right now it works as expected when I post for the lathe.

I'll have to do some digging to find the post processor for Fusion 360! I'm not sure it even resides on my computer as it seems a lot of Fusion 360 is in the cloud. (I may be wrong about that)

Anyway, I prefer to get my G28 calls to go somewhere a little farther from the end of the part for safety and for tool changes.

Thanks,

Dave C.
I learn something new every day! Problem is I forget two.
User avatar
Bill Shields
Posts: 10459
Joined: Fri Dec 21, 2007 4:57 am
Location: 39.367, -75.765
Contact:

Re: Using G28

Post by Bill Shields »

send me a direct email and let's get off the public board
Too many things going on to bother listing them.
User avatar
DICKEYBIRD
Posts: 176
Joined: Sat Feb 03, 2007 10:45 am
Location: Collierville, TN

Re: Using G28

Post by DICKEYBIRD »

Bill Shields wrote:send me a direct email and let's get off the public board
Gee whiz guys, maybe other inquiring minds would like to learn too. :( (Like me)
Milton in Tennessee

"Accuracy is the sum total of your compensating mistakes."
Bruce_Mowbray
Posts: 705
Joined: Sat Jan 04, 2003 7:45 pm
Location: Pennsylvania

Re: Using G28

Post by Bruce_Mowbray »

On my machine, x,y,z zero are the home positions of each of those axis. X table all the way to the left, Y table all the way to the back, Z spindle all the way up The last 4 lines of almost all of my programs are:

G91 G28 Y0 Z0 (rapid table all the way towards the front of the machine and spindle all the way up)
T1 M6 (put tool one in spindle)
M30 (end of program)
% (rewind to top of program) (automatically inserted by machine control)

If the last tool ends up at the far left or right of the travel envelope, I may put a G0 G91 X8.0 (rapid incrementally 8"+) before the tool change line just to make releasing clamps or screws and getting the part out of the machine doors a little easier.
Bruce Mowbray
Springville & Southern RR
TMB Manufacturing & Locomotive Works
Marty_Escarcega
Site Admin
Posts: 1730
Joined: Wed Dec 18, 2002 8:17 pm
Location: Mesa, AZ USA

Re: Using G28

Post by Marty_Escarcega »

DICKEYBIRD wrote:
Bill Shields wrote:send me a direct email and let's get off the public board
Gee whiz guys, maybe other inquiring minds would like to learn too. :( (Like me)
Agreed. While the explanation benefits one person going off line, the subject may come up publicly again and have to be repeated.
If its explained on line, it benefits many and those who come looking for information in the future.

Perhaps Dave_C will come back with what he learned or Bill will reconsider.
Marty
"Jack of all Trades, Master of None"
User avatar
Bill Shields
Posts: 10459
Joined: Fri Dec 21, 2007 4:57 am
Location: 39.367, -75.765
Contact:

Re: Using G28

Post by Bill Shields »

I have never been contacted by Dave C and honestly, since every control / machine lash up can be different and use G28 differently, I would prefer to have an un-interrupted conversation with the person about one machine configuration since it may very well only apply to HIS MACHINE and is best not confused with 'well I do this with my machine and it works...so why don't you do it this way?'.

This is a good case of too many cooks spoiling the soup.

after things are sorted out for Dave C (if I ever hear from him), he can communicate back to the group with what worked for him.
Too many things going on to bother listing them.
Marty_Escarcega
Site Admin
Posts: 1730
Joined: Wed Dec 18, 2002 8:17 pm
Location: Mesa, AZ USA

Re: Using G28

Post by Marty_Escarcega »

Thanks Bill. Your expertise and comments are always welcome. Hopefully Dave will reach out to you.
Marty
"Jack of all Trades, Master of None"
User avatar
Dave_C
Posts: 960
Joined: Mon Apr 21, 2008 10:34 am
Location: Springfield. MO.

Re: Using G28

Post by Dave_C »

Bill,

I tried several times to respond via the email link you posted but to no avail.

No worries, Mach 3 doesn't use G28 as you described. It simply goes to a preset "home" position (machine coordinates, not part coordinates).

I've been away for months, Rving all over the country so I haven't been on the board for quite some time. In the meantime, I sold the RV (a big box where you dump money) and I'm thinking about building a DIY Centroid Acorn Mill setup. So far I can't find a suitable frame (mill) that I want to put money into. I posted my Grizzly G3103 on Craig's list but no go.

The Centroid sofware is a real CNC software package and uses a full set of G Codes unlike the Mach 3 I have now.

So in reality, I didn't keep trying, I could have PM'd you but it just isn't worth the time for Mach 3.

Thanks,

Dave C.
I learn something new every day! Problem is I forget two.
Post Reply