Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: HimyKabibble on November 14, 2011, 10:46:47 PM

Title: G92 and G52 - How SHOULD They Work?
Post by: HimyKabibble on November 14, 2011, 10:46:47 PM
I've recently purchased a KFlop, and I've been playing with their controller application, KMotionCNC, and noting differences between it and Mach3.  My current confusion is surrounding G92 and G52, and how they interact.  Even after reading the relevent sections of Peter Smid's book, I'm not clear on what the *correct* behavior is.  So, here is a few hypothetical, and I'd like someone who knows for SURE, to tell me what the correct outcome is:

Example 1:

1) G52 Z0
2) Home the machine, and position to Machine Zero.
3) G92 Z2.0
4) G0 Z-1
4) G52 Z-1.0   => What does the Z DRO show after this?
5) G52 Z0       => What does the Z DRO show after this?

Regards,
Ray L.
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on November 14, 2011, 11:30:53 PM
HIYA RAY, Correct for what controller???  That is the problem.

One thing for sure it is NOT a good idea to mix the 2.

(;-) TP
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on November 14, 2011, 11:47:43 PM
Ray I can send you the info on G52 and G92 from the Fanuc manual if that would help.

(;-) TP
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: HimyKabibble on November 15, 2011, 12:06:57 AM
Terry,

Well, my understanding is Mach3 tries to be Fanuc-compatible, so I guess that's what I care about.  I have Peter Smid's book, and I've done reading in other places.  What I think I've concluded is that G92 and G52 both manipulate the exact same internal offset registers, the main difference being that G92 is more-or-less an "absolute" offset, while G52 is more of a relative offset.  So you really, really, REALLY should NOT mix the two, which means that if you want to use G52, the only "safe" way to set your initial work offsets is to first zero all the G52 offsets, then use G10 to set your fixture offsets using G54-G59, and THEN you can use G52 to temporarily offset from there.  Is that consistent with your understanding?

BTW - I am just about tearing my hair out trying to get the KFlop to work on my mill.  Much of it works just fine, but it's those last few details that are driving me nuts.  And for some reason, their controller app, KMotionCNC, is completely unusable on my machine, and I don't have a clue why.  Works OK if I run it on my laptop, but when I run it on the PC on my mill, as soon as I enable the KFlop, all four axes start jogging, and never stop.  Mostly works OK using Mach3, though there are still issues to be sorted with probing and spindle control.

OTOH, I got an Ethernet SmoothStepper today, and it worked pretty much on the very first try....

Regards,
Ray L.
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on November 15, 2011, 12:29:51 AM
I don't think of the G52/92 as more abs or relative.  But more that the G92 is a global offset and the G52 is a local temp offset.

I think I in mach they are exactly the same thing though. IF you call either mode in Mach3 you get the same modal number in the top mode message bar. SO who really knows. Probably best to research the original EMC base code to see what it was in the beginning and test from there to verify.

G92 is considered obsolete and replaced by the G54-59 system. BUT everyone seems to still use it.  I would preferr the G10L2 system to update teh G54-59 to using the G92. BUT the G92 is simple to use.

Take your pick(;-), (;-) TP

Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on November 15, 2011, 12:36:56 AM
Ray I sent you a copy of the manual look starting at chapter7.2

(;-) TP
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: HimyKabibble on November 15, 2011, 12:53:04 AM
Terry,

Thanks!

Regards,
Ray L.
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on November 15, 2011, 01:14:01 AM
Ray I double checked an older version and it appears that the G52 G92 ARE seperate intities as they do show seperately in the mode bar.

(;-) TP
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: HimyKabibble on November 15, 2011, 01:56:56 AM
Ray I double checked an older version and it appears that the G52 G92 ARE seperate intities as they do show seperately in the mode bar.

(;-) TP

Terry,

You mean an older Fanuc version, or Mach3?

Regards,
Ray L.
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on November 15, 2011, 10:27:45 AM
Mach3, (;-) TP
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: RICH on November 15, 2011, 05:38:44 PM
From one who is not the sharpest tack on coding.........

G52 can be used to shift the original offset ( G54) by some value and can be cancelled thus the original work offsets are not changed as compared to using a G10 which would permantely change the offsets. I have an example of how to use the G52 in the LazyTurn Manual ( located in Members Doc's ) Appendix "F" page 14 of 21 section 6.2.
Note that you need to have an offset in place before using the G52.

If wrong feel free to correct...
FWIW,
RICH
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: fixitforgood on January 30, 2012, 12:42:40 PM
Hi guys, new to your forum site! To my knowledge, G92 does give you a new permanent work offset, as you specify in your program. I first saw it in a bolt hole circle program, where the threads were cut with a threadmill, and the programmer wanted to change the absolute offset for every hole on the part, so he wouldn't have to use G91 to incrementally cut the threads. (which is the way I am used to). He uses G92 extensively in surface grinding too. I've noticed that on our Haas control, (if I remember correctly) inputting something into G52 will go back to zero when you press reset, or it comes to optional or programmed stop. Our Kuraki horizontal machining center, it will stay there till you change it. G92 is inputted in the program, G52; while doing the same thing for you, is inputted in the offsets page. An example of needing to use both would be if you shift your X0Y0 offset with G92 in the program, and you are cutting a face into something, and your tool didn't go in deep enough... so you go to your offsets page, move in your G52 Z to the amount you think itll clean up, and re-run the tool.. and take the G52 Z back out, because you don't want the other details to cut that deep (or a tool to crash if your R-plane is close enough).

-Eric
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: fixitforgood on January 30, 2012, 02:16:16 PM
One more thing about G52... If your control doesn't zero out what you've inputted in G52, whatever you input into G52 will change (or add) every offset in your program by that amount. ex: if you put -5. in the x, it will add -5 into any offset running in the program... not just one. The first thing I do before I run a part from somebody else running the machine is to check the G52. You never know when somebody put something in there, and forgot to tell you!!
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on January 30, 2012, 03:15:19 PM
With Mach3 it is NOT a good idea to use BOTH at the same time.  Many controllers use the G92/52 differently best NOT to confuse Mach3 with ANY other controller but go with what is defined in the manual.

Generaly speaking the G92 is a local offset and the G52 is a global offset.

Just a thought, (;-) TP
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: RICH on January 30, 2012, 05:17:35 PM
Terry,
I am confused some.....
Does G92 provide an offset from the part back to the the tool / controlled point, where as, G54 provides provides for an offset from the controlled point to the part.
Too much Smid on the brain  or  my notes. :)

RICH
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on January 30, 2012, 08:05:18 PM
We may all be confused.  G92 shouldl offset the part in the current fixture(SayG54). AND I believe the G52 SHOULD offset ALL the fixtures as well.

But I remember the MACH3 manual WARNS that is is NOT a good idea to do both at the same time.

Mach3 does NOT always follow the Fanuc conventions (;-)

Might be time to TEST both to be sure.

(;-) TP

(;-) TP
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: BR549 on January 30, 2012, 08:18:57 PM
BY the manual I have it backwards G52 is local and G92 is global, G92 actually reset internal parameters when in use. It warns NOT to use the legacy G92 when other offsets are applied. And it advices not to use both G52 and G92 at the same time.

I can tell you for sure with G92 in effect strange things happen form time to time whether it is MACH3 or self inflicted they do happen(;-)

Sticking with G52 and G10 was very stable

I 'd have to look up the Fanuc version again to be sure.

Just a thought, (;-) TP

Title: Re: G92 and G52 - How SHOULD They Work?
Post by: ger21 on January 30, 2012, 10:53:20 PM
If you do a G52, the offset will also show up in the G92 DRO, so they do seem to share internal parameters.
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: RICH on January 30, 2012, 10:55:47 PM
Will admit not the sharpest tack on all the different codes. A few notes from my notes on use:
- G92 is an old /  legacy command and was basicaly replaced by G52 along with the G54 / work offsets
- G52 - a temporary offset - you need to have a work offset in place since it offsets the original offset by some value and can be cancelled thus
  the original offsets are not cancelled
- G10 will change the workoffset

The only time I use the G52 is for code form  Lazyturn.  Attached is how to use it from the LazyTurn Manual Appendix "F". Thanks to Grayham for
showing me how to use it.

RICH
Title: Re: G92 and G52 - How SHOULD They Work?
Post by: rcaffin on January 31, 2012, 01:17:22 AM
Quote
Works OK if I run it on my laptop, but when I run it on the PC on my mill, as soon as I enable the KFlop, all four axes start jogging, and never stop.
Laptop is floating, PC isn't?
60/120 Hz noise, wrong signal polarity, ... ?

Cheers
Roger