Hello Guest it is March 28, 2024, 10:49:00 AM

Author Topic: G42 problem  (Read 20420 times)

0 Members and 1 Guest are viewing this topic.

Offline Psad

*
  •  82 82
    • View Profile
G42 problem
« on: August 01, 2006, 12:18:40 PM »
I posted this on the lazycam forum but i think it may be more of mach 3 issue.  Attached is a tap file created with LC latest release.
When i run this file using a .250 cutter in tool #1 the cutter is weird at the leadin area.  It appears there is an issue right after the G42 command.  It appears that Line 60 and 65 combine instead of 60 completing before 65 starts.  As the leadin finishes there is a slight angle as it moves to the tool path.  It does not make sense because according to the code it should not combine the too moves.  If it did the angle would be the entire length of the first compensated toolpath. 

In my first post i recieved a reply from someone (ger21) telling me i had not put in enough information for tool # or tool dia but that does not seem to be the issue.  The file runs fine from LC except for this one issue.  I tried modifying the code file with that Ger21  suggestion, still same problem.  I also tried this with other leadins and with version 90.60 still same issue.

Am i nuts or am i doing something wrong.

LZ postion is also about g42 problems about #3 down the list.

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: G42 problem
« Reply #1 on: August 01, 2006, 09:26:15 PM »
What is the code like if you tell LZ that the cutter is .125" dia

Graham.
Without engineers the world stops

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: G42 problem
« Reply #2 on: August 02, 2006, 08:05:52 PM »
N40    X0.5817 Y0.5729
N45 M3 S100
N50    Z0.1000
N55 G1 Z-0.2500  F3.00
N56 G42 p0.125
N60    Y0.4004  F10.00
N65    X0.2129

It appears to me to be working exactly as it should. It's not combining the moves. I think you don't understand how the advanced comp works in Mach.

When you use comp, at the position prior to the G42, the center of the tool is at that position, in this case X .5817 Y .5729 is the center of the tool. As the tool begins to move, it moves to a postion where the tool edges are tangent to the next two moves. Imagine drawing an angle through your 3 points.

X .5817 Y.5729
X .5817 Y .4004
X .2129 Y .4004

After the comp, the tool is tangent to the 2 sides of the angle.

I did a sample drawing. The blue circle is the tool before the G42. Red line is the g-code without the comp, which is what Mach displays. Green line is the actual comped path. The first angled move is the G1 Y.4004 move. As the comp is applied, the tool moves to the tangent point of that move and the next move. Notice how it's tangent to the red line.

This is exactly how it's supposed to work. If you want the tool to start on your part at the same place it ends, you'll need to apply the comp one move sooner.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Psad

*
  •  82 82
    • View Profile
Re: G42 problem
« Reply #3 on: August 03, 2006, 06:39:57 AM »
Your right I did not understand how it worked.  as they say a picture is worth a 1000 words.
thanks.  Should the last cut then remove the small angle since it is going back to the center of the green circle???? 

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: G42 problem
« Reply #4 on: August 03, 2006, 07:54:59 AM »
  Should the last cut then remove the small angle since it is going back to the center of the green circle???? 

No, the last cut does not go back to the green circle. You need to start your cut farther to the right and overlap slightly, or enter and exit using tangent arcs at the same point and apply the comp before you get to the entry arc.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline Psad

*
  •  82 82
    • View Profile
Re: G42 problem
« Reply #5 on: August 04, 2006, 09:17:07 AM »
Now i see the advantage of the 45 and arc type leadins as opposed to the straing in.
Never to old to learn soemthing new.
Re: G42 problem
« Reply #6 on: December 01, 2006, 09:50:34 PM »
N40    X0.5817 Y0.5729
N45 M3 S100
N50    Z0.1000
N55 G1 Z-0.2500  F3.00
N56 G42 p0.125
N60    Y0.4004  F10.00
N65    X0.2129

On line N56...if you replaced the G42 with G41 would the offset be on the left side of the path..I just imagine that I am the cutter bit going down the path like a highway..wouldn't a G41 place me in the left lane and a G 42 place me in the right lane and no offset code would put me in the middle lane..Am I thinking right here?? ???

Offline Graham Waterworth

*
  • *
  •  2,668 2,668
  • Yorkshire Dales, England
    • View Profile
Re: G42 problem
« Reply #7 on: December 02, 2006, 01:42:23 AM »
That would depend on where you live UK or US  ;D

G41 and G42 are dependent on the direction you are traveling clockwise or counterclockwise

This should help to explain it :-

O0001 (COMP G41 AND G42)

G21 G40
G91 G28 X0 Y0 Z0

(OUTSIDE CW)
G54 G00 G90 G43 X-19.445 Y35.91 Z25. H3 S2500 M3
G00 Z1.
G01 Z-1. F500.
G01 G41 D23 X-5.303 Y14.697 F800. S2500
G03 X0. Y12.5 R7.5
G02 X10.827 Y-6.248 R12.5
G02 X-10.827 R12.5
G02 X0. Y12.5 R12.5
G03 X5.303 Y14.697 R7.5
G01 G40 X19.445 Y35.91
G00 Z25.

(INSIDE CW)
G00 X46.25 Y3.75
G00 Z1.
G01 Z-1. F500.
G01 G42 D23 X50. Y12.5 F800. S2500
G02 X60.827 Y-6.248 R12.5
G02 X39.173 R12.5
G02 X50. Y12.5 R12.5
G01 G40 X53.75 Y3.75
G00 Z25.

(INSIDE CCW)
G00 X53.75 Y-46.25
G00 Z1.
G01 Z-1. F500.
G01 G41 D23 X50. Y-37.5 F800. S2500
G03 X39.173 Y-56.248 R12.5
G03 X60.827 R12.5
G03 X50. Y-37.5 R12.5
G01 G40 X46.25 Y-46.25
G00 Z25.

(OUTSIDE CCW)
G00 X19.445 Y-14.09
G00 Z1.
G01 Z-1. F500.
G01 G42 D23 X5.303 Y-35.303 F800. S2500
G02 X0. Y-37.5 R7.5
G03 X-10.827 Y-56.248 R12.5
G03 X10.827 R12.5
G03 X0. Y-37.5 R12.5
G02 X-5.303 Y-35.303 R7.5
G01 G40 X-19.445 Y-14.09
G00 Z25.

G91 G28 Y0 Z0
M30

Without engineers the world stops

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: G42 problem
« Reply #8 on: December 02, 2006, 10:38:05 AM »
Let no Man nor Beast question the infinite knowledge of the G Code Guru. ;D Nice break down Graham. Even I can understand that.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: G42 problem
« Reply #9 on: December 02, 2006, 10:39:52 AM »
Make sure you have a tool size for tool #23 in your tool table before running Graham's code, or you won't see any comp occuring.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html