Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: PeterF on March 17, 2010, 03:07:57 PM

Title: real meaning of G28 ?
Post by: PeterF on March 17, 2010, 03:07:57 PM
I'm new to G Code and just a computer technician, sort of. Questions relating to G28 going "home".

(a) is G28 going to machine zero, or to the home offset coords given in Config->Homing/Limits? Is "home" meaning machine zero?

(does "ref all home" set the parameters 5161 thru 5166? to zero, or to the offsets given in Config->Homing/Limits, or not touch them?)

(b) is G28 Z0 going to Home/mach zero in all axes, or just in the Z axis (thru abs 0), and why is this so because my docs say otherwise. Why is G28 Z0 not moving the X and Y axes?

I observe that G28 Z5 moves only the Z axis, going to Z5 then Z0. This is of course very sensible, but not so written.


Are these behaviours of Mach3 configureable?
Title: Re: risky meaning of G28 ?
Post by: PeterF on March 17, 2010, 03:39:33 PM
And to find that G28 Z5 moves only Z axis, but G30 Z5 moves z to Z5, then all axes to zero.

(the intermediate value to be handled in work coordinates, in G28 Z0 and G30 Z0).
Title: Re: real meaning of G28 ?
Post by: Graham Waterworth on March 17, 2010, 06:20:10 PM
G28 X0 Y0 Z0 will send the machine to a known home position, e.g. you have homed the machine manually.

G28.1 X0 Y0 Z0 will search for the home position.

G28 X5. will go to home via the position X5. ( used to avoid obstructions and the like )

Graham
Title: Re: real meaning of G28 ?
Post by: PeterF on March 17, 2010, 06:56:46 PM

G28 X5. will go to home via the position X5. ( used to avoid obstructions and the like )

Graham


 Mach3 R3.042.033 would not go to zero.

Specifically G28 X5. moves horizontally to X5 in work coords+tool offset, then moves horizontally to X0 in mach coordinates. Y and Z are left unmoved.

It is a surprise and I am looking for some confirmation and additional information. (This is admittedly, on my simulation notebook. G91G28Z0 on the real controller moved similarly, XY left unmoved as far as I remember.)
Title: Re: real meaning of G28 ?
Post by: PeterF on March 18, 2010, 02:20:15 PM
Life isn't easy, but wonderful.

NIST RS274 specification says: G28 goes to home (home is defined by parameters 5161-5166). Mach3 goes to zero, ignoring parameters 5161-5166.

NIST RS274 says also: G28 goes to home thru the point given, in terms of the absolute coordinate system. Mach3 goes to zero only on the axes given, thru the axes points given and interpreting the latter in work coordinates.

Since I am basically just supporting an engineer, without roots in the shop or in cnc, but used to specs, NISTies or not - what am I really missing? I'm not about the deviations, but about their silency and the possible consequences in the shop. Is this all plain experience?

Title: Re: real meaning of G28 ?
Post by: Graham Waterworth on March 18, 2010, 02:26:06 PM
Who said that Mach3 is NIST compatable ?

Graham
Title: Re: real meaning of G28 ?
Post by: PeterF on March 18, 2010, 03:17:14 PM
You are right. However, the contents of Mach3\Mach3MillGcode.htm seem NIST-compliant (respectively it is the very same text). If there is some more information available, I would be grateful. If not available, we remain grateful and cautious.

edit: I notice the size change by admin, do it myself this time.
Title: Re: real meaning of G28 ?
Post by: Overloaded on March 18, 2010, 03:50:05 PM
I'm glad this subject came up again.
I am a bit confused with G28 and G28.1 in relation to the Mach explanations of each.
I may be interpreting them wrongly but this is what I see.

Config. X and Y Home neg.
With machine HOMED, G28 sends all axis's to Machine 0    as expected.
                                G28X2 sends x to 2, then to 0, nothing else. Axis words are optional but if one is used, axis words must be used for every axis that needs to be returned to home as well. IE: G28X2Y0Z0A0  OK, that's a bit different than I expected but can live with it if that's the way it is intended to be. But by reading the summary, I expected all axis's to go to 0 weather called or not.

Now G28.1 gives me a headache.
      Assuming this is all in Mach. coords.
Using the Summary of GCodes in Mach
current position = X10 Y10 (mach. coords)
MDI G28.1 X1 Y1   I would expect the axis's to rapid simultaneously to machine coord x1y1, then commence the normal referencing routine per config. but it doesn't.
Both axis's make a simultaneous INCREMENTAL move in the POS direction of 1 to X11 and Y11 and then the normal referencing routine begins to seek the switches in the proper NEG direction.

If, from the same X10 Y10 position, you MDI G28.1 X-9 Y-9, it does exactly as I would expect it SHOULD do by entering G28.1X1 Y1.
I may be reading the Summary wrong but not sure.
Any clarification would be great !
V33

Been banging my head on this for 2 weeks ..off and on. lol
Thanks
Title: Re: real meaning of G28 ?
Post by: Graham Waterworth on March 18, 2010, 03:50:28 PM
Mach3 Version 4 is much more compliant with the standard, but in saying that not many modern CNC controls follow the standard to the letter, Mach3 will be the same, there are enhancements and omissions and as such running any code created for any other G-code control must be run with care.

Regards
Graham
  
Title: Re: real meaning of G28 ?
Post by: Overloaded on March 18, 2010, 03:56:23 PM
...and to mention, the machine coord X10 Y10 is also Part coord X0 Y0  so the G28.1 X1 Y1 MDI is actually moving both axis's in work coords as well ? ?
Not sure if it should ? ?
Title: Re: real meaning of G28 ?
Post by: Graham Waterworth on March 18, 2010, 04:00:35 PM
If Mach has no known home position it can not work to absolute values so it reverts to incremental values in G53

Graham
Title: Re: real meaning of G28 ?
Post by: PeterF on March 18, 2010, 04:17:21 PM


Now G28.1 gives me a headache.
      Assuming this is all in Mach. coords.
Using the Summary of GCodes in Mach
current position = X10 Y10 (mach. coords)
MDI G28.1 X1 Y1   I would expect the axis's to rapid simultaneously to machine coord x1y1, then commence the normal referencing routine per config. but it doesn't.
Both axis's make a simultaneous INCREMENTAL move in the POS direction of 1 to X11 and Y11 and then the normal referencing routine begins to seek the switches in the proper NEG direction.

Been banging my head on this for 2 weeks ..off and on. lol
Thanks

The incremental preliminary motion of G28.1 is easy to explain. You are probably in G91 mode (if not, i.e. in G90 mode, then see next absatz).

And please note, the preliminary position in G28 and G28.1 is actually in work+tool coordinates.  (if you have been in G90 mode, then your work [+tool] offset should happen to be (-10,-10,*)  (+10,+10,*) ).

No matter what the NIST-compliant documents say. I just simulated it in Mach3 on my laptop.

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

The G-Code generator (Mach3-Postprocessor) we are using seems to take Mach3 into account. It clears to home with two lines, and note G91 mode for both lines.
Code: [Select]
N990 G91 G28 Z0.
N992 G28 X0. Y0.
Title: Re: real meaning of G28 ?
Post by: Overloaded on March 18, 2010, 04:46:34 PM
Thanks guys, please excuse the interruption Pete.
I'm beginning to get a grip on it.
I see now how to make it work, just not exactly as I expected.
I have had very little exposure to CNC in general.
Thanks again.
Title: Re: real meaning of G28 ?
Post by: PeterF on March 18, 2010, 05:06:41 PM
No reason to excuse. Your question was welcome.

I just noticed the release of Mach3 version 3.042.038 and will install it tomorrow in the shop. Actually the spindle (unrelated to this thread) is in the "fixed" list.

Peter.
Title: Re: real meaning of G28 ?
Post by: TommyF on October 11, 2018, 06:03:25 AM
What specifically does the G28  Z input in SoftLimits setup menu?   

If i use G28 in mach3 POST, my 3040 that i ZERO over the origin on my workpiece,,,, at start Z goes up to zero and then to XY to carve position, all good to avoid clamps,,, if i know i have clearance at want Z to stop at ie 20mm over the stock to save time, where should i write it, in Fusion360 POST or uve Mach3?
My Z is 0 at top and -60 at bottom..
Title: Re: real meaning of G28 ?
Post by: RICH on October 11, 2018, 08:37:01 AM
TommyF,
Quote
What specifically does the G28  Z input in SoftLimits setup menu?  

 I assume you are refering to the G28 home location coordinates on the bottom of  the flyout screen
( Motor Home/SoftLimits)  via Config>Homing Limits. There is no information in the Using Mach3Mill manual
for that part of the screen.

G28 home location information is given in section 5.6.1.4 of  Mach3 CNC Controller Software Installation and Configuration
manual. It states:
The G28 coordinates define the position in absolute coordinates to which the axes will move when a G28 is executed. They are interpreted in the current units ( G20 / G21 ) and are not automaticaly adjusted if the units system is changed.


Now just some comments:
- I personaly have never used that part of the flyout.

- The thread topic is Re; real meaning of G28.
   G28 is a G code commmand, defined by Mach3 in the manual 10.7.10 ( see also G28.1 , G30, G53). I have seen many
   comments / questions over time about it's use.  There are threads on the subject. One should have an understanding
   of  G28, G28.1, G30 in light of referenced / unreferenced machine/ type of machine, G54 / G90 / G91 active or inactive, and
   what  happens using  the commands and screen buttons, may as well throw in axis feedrate.
  
- There is a lot to gained by playing around with G28 relative to differant states of the machine...........one can learn a lot!

FWIW,
RICH