Welcome, Guest. Please login or register.
Did you miss your activation email?
September 17, 2014, 02:33:05 PM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  G-Code, CAD, and CAM
| |-+  G-Code, CAD, and CAM discussions
| | |-+  G42 problem
Pages: 1 2 3 »   Go Down
Print
Author Topic: G42 problem  (Read 6515 times)
0 Members and 1 Guest are viewing this topic.
Psad
Active Member

Offline Offline

Posts: 82


View Profile
« on: August 01, 2006, 11:18:40 AM »

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.

* leg part 27.tap (0.52 KB - downloaded 145 times.)
Logged
Graham Waterworth
Administrator
*
Online Online

Posts: 1,768


West Yorkshire, England



View Profile WWW
« Reply #1 on: August 01, 2006, 08:26:15 PM »

What is the code like if you tell LZ that the cutter is .125" dia

Graham.
Logged

G-Code is on the cutting edge

Autovalues Engineering, CNC machining specialists, Bradford, England
ger21
Global Moderator
*
Offline Offline

Posts: 3,908



View Profile WWW
« Reply #2 on: August 02, 2006, 07: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.


* comp.gif (3.73 KB, 709x502 - viewed 533 times.)
Logged

Psad
Active Member

Offline Offline

Posts: 82


View Profile
« Reply #3 on: August 03, 2006, 05: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?Huh 
Logged
ger21
Global Moderator
*
Offline Offline

Posts: 3,908



View Profile WWW
« Reply #4 on: August 03, 2006, 06:54:59 AM »

  Should the last cut then remove the small angle since it is going back to the center of the green circle?Huh 

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.
Logged

Psad
Active Member

Offline Offline

Posts: 82


View Profile
« Reply #5 on: August 04, 2006, 08: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.
Logged
C.Michael
Active Member

Offline Offline

Posts: 26


View Profile
« 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?? Huh
Logged
Graham Waterworth
Administrator
*
Online Online

Posts: 1,768


West Yorkshire, England



View Profile WWW
« Reply #7 on: December 02, 2006, 01:42:23 AM »

That would depend on where you live UK or US  Grin

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



* G41_-_G42.jpg (34.25 KB, 531x600 - viewed 398 times.)
Logged

G-Code is on the cutting edge

Autovalues Engineering, CNC machining specialists, Bradford, England
Chaoticone
South Carolina, US
Administrator
*
Offline Offline

Posts: 4,737


Precision Chaos



View Profile WWW
« Reply #8 on: December 02, 2006, 10:38:05 AM »

Let no Man nor Beast question the infinite knowledge of the G Code Guru. Grin Nice break down Graham. Even I can understand that.
Logged

Grin If you could see the things I have in my head, you would be laughing too. Grin
www.precisionchaos1.com
My guard dog is not what you need to worry about!
ger21
Global Moderator
*
Offline Offline

Posts: 3,908



View Profile WWW
« 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.
Logged

Pages: 1 2 3 »   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!