Page 1 of 1

G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 12:00 am
by Dan911
Could someone please point out with my posted G-code why I get this warning.

This is a plugin I been working on and if I use any X Y start point other than X0 Y0 this warning don't appear. " Warning code 2: Approach angle to low. angle < 180 degrees on row 3 "

The plugin reads your tool and adjust start point with tool diameter. Why does a X0 Y0 generate this warning ?

Thanks,
Dan

Code: Select all
 
(Quick Cam Wizards Version 1.003)
(Date:2018-03-07  Time:06:14:18)
G00G17G90G40G49G80
X-0.25 Y-0.25
G1 G42 D1 X0 Y0 F200
Z-.125

Re: G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 12:48 am
by ger21
I'm hoping that the current lead in method gets changed, which would eliminate these warnings.

According to the manual:

This warning happens when the angle of the starting point and the next 2 points is
180°, because this can cause an undercut when the tool approaches the toolpath.

Re: G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 1:07 am
by Dan911
Thanks Gerry for the quick response. I have no experience with G41/G42, I'm 1 of those newbs that just relied on my cam software and assumed it was a error on my part but just couldn't figure out where. Still a little confused since giving the lead in the diameter of tool.

Also...But why than only on X0 Y0? If I use any other X Y start point no warning?

Example below I used X6 Y6 as my start and No warning. :?
Code: Select all
(Quick Cam Wizards Version 1.003)
(Date:2018-03-07  Time:06:14:18)
G00G17G90G40G49G80
X5.75 Y5.75
G1 G42 D1 X6 Y6 F200
Z-.125


Appreciate your help,
Dan

Edit... BTW D1 is a .25 diameter tool.

Re: G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 1:18 am
by ger21
I think that you'll find that the tool location before your g-code starts may be affecting the comp. It shouldn't do this, but it does currently.
It actually applies the comp to the point prior to the G42. Or at least uses the previous position to determine how comp is applies.
I'm expecting this behavior to change, so you may want to wait until the comp matures a little more.

Re: G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 1:22 am
by Dan911
Thanks Gerry in helping make it more clear to me of what's happening.

Re: G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 2:20 am
by Dan911
OMG! Just found your thread below a few of this 1 :oops:

Need to do a little more reading before posting.

Re: G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 10:55 pm
by Dan911
Thanks Terry I'm starting to get a slight grip on this but must emphasize SLIGHT...lol

This makes sense of my results, following this(UCCNC type3?) I receive no warnings except with X0 Y0.

D1 = .25 diameter.

So why the warning with?

X-.25 Y-.25
G1 G42 D1 X0 Y0

As always your help much appreciated,
Dan

Re: G41/G42 code 2 warning

PostPosted: Thu Mar 08, 2018 11:13 pm
by cncdrive
The leadin compensation happens, calculated with the current TCP point and your first and second point.
If your current point is in a position, on an angle which is too low then it will cause an undercut compared to the perpendicular of the first programmed point and then you getting a warning message.
So, the issue is not with the X0 Y0, but where your axis is standing (current TCP coordinate) when you load the code.

Re: G41/G42 code 2 warning

PostPosted: Fri Mar 09, 2018 12:06 am
by Dan911
ger21 wrote:I think that you'll find that the tool location before your g-code starts may be affecting the comp.


Thanks Balazs!!! your post made the click.