Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: cncamtateur on March 07, 2011, 02:48:19 PM

Title: Cutter compensation issues...
Post by: cncamtateur on March 07, 2011, 02:48:19 PM
Hey everyone,

For months now I have been struggling with getting cutter compensation (G41) to work with Mach3. I've read everything I could find on the subject, but unfortunately I'm stuck. I've even written some scripts that will take the gcode below and reverse the compensation by changing the coordinates by the radius of the tool, but that has proven to be difficult to perfect.

Anyways.. here is the sample code: https://gist.github.com/da9f16759332b47ca3e2

This code does run through the machine, and the dimensions are correct. Unfortunately though, at various stages it will ruin the part, either as it finishes the compensation or as its about to begin.

First issue is that for the "blind dado", as it finishes the cut and attempts to raise the tool (Z1.375), it will snag the piece and cut a hole out of it .. as though it's removing the compensation too early.

Second issue is in the "outline" where the first pass (the lead in move), will essentially move on a diagonal as it lowers the tool for cutting. However, the second pass cutting the same line while within the compensation is fine. Then again it snags away on my piece as it finishes.

Any ideas would be greatly appreciated.

Best,

Peter
Title: Re: Cutter compensation issues...
Post by: ostie01 on March 07, 2011, 03:56:18 PM
Try placing the X and Y coordinates after the G41.

Like:

G01 G41 x10 Y10 (or what ever is your coordinate)
Z.1
Z-.5
G01 ....

Jeff




Title: Re: Cutter compensation issues...
Post by: ger21 on March 07, 2011, 04:57:48 PM
What diameter is your tool #2?

And I get an error on the first line, can't use G00 and G28 together.
Also get an advanced comp error, "solution too complex".

Can you post a .dxf of what you're trying to do? Looks to me like you need a proper lead in move.

Is this in inches, or mm's?
Title: Re: Cutter compensation issues...
Post by: cncamtateur on March 07, 2011, 05:15:10 PM
Hey guys. Thanks for the help.

The tool (2) diameter is 0.375

This is in inches. I don't have a DXF .. but I did make an image to illustrate the part I'm looking to cut: http://i.imgur.com/AICm1.png

Interesting.. "solution too complex" .. that sucks.

Title: Re: Cutter compensation issues...
Post by: RICH on March 07, 2011, 06:00:58 PM
Post the code and i will create a dxf for you.
RICH
Title: Re: Cutter compensation issues...
Post by: ger21 on March 07, 2011, 06:04:24 PM
This will do what you want. And I've attached a .dxf of what I did.

G20 G40 G90
M3
G0 Z0.5
G0 X4.9218 Y95.4292 Z0.5
G1 X4.9218 Y95.4292 Z0.0 F75
G41D2
G1 X5.9218 Y95.2340 Z-1.0 F250
G1 X10.8437 Y95.2340 Z-1.0
G1 X10.8437 Y95.6245 Z-1.0
G1 X1.0 Y95.6245 Z-1.0
G1 X1.0 Y95.2340 Z-1.0
G1 X6.1718 Y95.2340 Z-1.0
G40
G1 X6.6718 Y95.4292 Z-1.0
G0 X6.6718 Y95.4292 Z0.5
G0 X-0.3841 Y88.9602 Z0.5
G1 X-0.3841 Y88.9602 Z0.0 F75
G41D2
G1 X0.0 Y90.0 Z-1.0 F250
G1 X0.0 Y96.0 Z-1.0
G1 X11.4687 Y96.0 Z-1.0
G1 X11.4687 Y84.0 Z-1.0
G1 X0.0 Y84.0 Z-1.0
G1 X0.0 Y90.2500 Z-1.0
G40
G1 X-0.2500 Y90.7500 Z-1.0
G0 X-0.2500 Y90.7500 Z0.5
G0 Z3
G0 X25 Y15
M5
M30
Title: Re: Cutter compensation issues...
Post by: RICH on March 07, 2011, 06:12:22 PM
per your link see attached of the pathing,
 I see Gerry took care of things...... :)
RICH