Hello Guest it is March 28, 2024, 04:58:19 PM

Author Topic: Very basic question about tool diameter compensation  (Read 43742 times)

0 Members and 1 Guest are viewing this topic.

Very basic question about tool diameter compensation
« on: August 07, 2008, 12:02:51 PM »
I've seen this mentioned before, but I still can't quite figure it out...

I'm trying to make a simple 2D cutout in Plexiglas. It's one continuous cut, and looks a little like an F. To get it cut to a precise size, I obviously have to compensate for the end mill diameter. On the main screen of Mach3, there is a tool diameter setting, but putting the diameter in didn't make any difference. I also noticed a setting in Lazycam, which seemed even more thorough (Like asking whether to trace on the inside or outside), but that didn't seem to make a difference either. What I really need is a Tool Diameter Compensation FAQ.

1) Is it better to do this in LazyCAM, or Mach3? Does it need to be done in both? All things being equal, I'd rather do it in Mach3, as I likely will decide on different size tools.

2) Is there an accurate way to predict the cut will be right? The part I'm making is 1 inch long, using a cutter less than 1MM Dia.

3) Some of the areas between larger protrusions (Think of the area between the top and middle protrusion on the letter F) are only slightly larger than the end mill. Will this confuse Mach3?

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Very basic question about tool diameter compensation
« Reply #1 on: August 07, 2008, 12:21:39 PM »
Cutter diameter compensation is governed by G40 (Compensation off) G41 (Compensation left) and G42 (Compensation right). What I must admit is that I have never been told what left and right mean - does that mean the tool is on the left or right - or the compensation is on the left or right.

In the case of the enclosed "window" - do you have to change as the cutter goes up one side, then down the other. I do not know. Perhaps someone versed in G Code could tell us. However I have no doubt that Mach does it correctly.

When cutting something like this, I have always written the code to cut, i.e. where I want the tool to go, and you can look at the code and check it before cutting, especially if your tolerances are so fine (a cutter less than a mm - phew).

There is another problem as well - where the cut finishes. Start the cut halfway along a straight edge and finish along the same straight edge, do not meet at a corner - because you do not know where the compensation is applied.

I hope you understand the diatribe - and perhaps spmeone will enlighten us.
Not me driving the engine - I'm better looking.
Re: Very basic question about tool diameter compensation
« Reply #2 on: August 07, 2008, 12:48:40 PM »
I appreciate the response. However, G-Code is like Greek to me :). It's well beyond my abilities to write G-Code for even the existing shape, let alone compensating for the tool. I was hoping this was something that could be automatically calculated by Lazycam or Mach3. I probably should have prefaced my original comment by saying that I am a complete CNC newbie. I have made only 2 things in my life on a CNC machine (Which I'm actually very impressed I made it this far), and neither turned out right because the tool followed the outline of the object without compensating for tool diameter.

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Very basic question about tool diameter compensation
« Reply #3 on: August 07, 2008, 01:35:15 PM »
What I must admit is that I have never been told what left and right mean - does that mean the tool is on the left or right - or the compensation is on the left or right.


Actually, those are both the same. :) Comp right would be to move the tool right.




There is another problem as well - where the cut finishes. Start the cut halfway along a straight edge and finish along the same straight edge, do not meet at a corner - because you do not know where the compensation is applied.


If you lift the tool before calling G40, you don't have to worry about it.

I think the OP needs a CAM package to do the offsets for him. V-Carve Pro and I believe SheetCAM will both do this. Does LazyCAM Pro do it as well?
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Very basic question about tool diameter compensation
« Reply #4 on: August 07, 2008, 02:00:43 PM »
Hi, As far as I understand, and please correct me if I am wrong!! The compensation follows the direction of the cutter ie: If you were cutting a square shape in a clockwise direction and you wanted the end result to be a square hole the cutter should be offset to the right, If you wanted the result to be a solid square in the middle you would use left compensation. It is only when you change direction eg: going anticlockwise that you need to alter the offset to the left. like if you were to cut an S shape you would need both left and right tool compensation. I have seen on the forum that if you have to change from left to right it is best to move the cutter out of the material before changing offsets.

I would have thought it was best to set the value of offset in Mach rather than in the code so if you have to change cutters and your second cutter has been reground ie slightly smaller in diameter, it will make it easier to get the final result perfect.

Am I making sense or have I had one too many..

Offline bowber

*
  •  216 216
  • Kirkby Stephen,Cumbria, UK
    • View Profile
Re: Very basic question about tool diameter compensation
« Reply #5 on: August 07, 2008, 02:45:29 PM »
As I remember from the little I've used tool diameter compensation you have to enter the tool diameters into mach's tool table, i.e T1 = 1mm etc.
you then call T1 in your code move to position then call the appropriate compensation G41 or G42, you then cancel the compensation after the tool is out of the job at the safe height.

Do a search on google for G40, 41 and 42

I also seem to remember there being a problem Mach at some point with calling compensation before the first move.

Steve

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Very basic question about tool diameter compensation
« Reply #6 on: August 07, 2008, 07:13:22 PM »
You don't need to set up the tool table to use comp, but you can if you like. There are two ways to use it. (Actually 3)

1) Call comp and specify the tool radius using the P word. For a 1/8" diameter bit, you'd use G41 P0.0625 or G42 P0.0625.

2) Call comp and specify the tool # in the tool table using the D word. This will use the radius of the tool in the table. To use comp with tool #3, use G41 D3 or G42 D3.

3) Basically the same as #2, but don't call any tool at all. Mach3 will use the diameter of the current tool (based on the diameter in the tool table). Just use G41 or G42.


To use comp properly, you need a lead in move where the comp is applied. Without comp, the center of the tool follows the g-code. When you call G41/G42, comp is applied during the move from the previous location to the one following the G41/G42. I like to use G41/G42 on it's own line, but you can combine it with the leadin move. Both of these will do the same thing:

G1 X0 Y0
G42 D1
G1 X1 Y1
G1 X2 Y1

is the same as

G1 X0 Y0
G1 G42 D1 X1 Y1
G1 X2 Y1


Once comp is applied, it remains in effect until you call G40. Depending on the move following the G40, comp can be either gradually or abruptly removed. You can use a leadout move, or you can raise the tool above the work and then remove the comp.

Left(G41) or right (G42) is pretty easy to figure out. Imagine walking along the toolpath in the cut direction. G42 will move the tool to the right side of the path, G41 will move it to the left side of the path. If you have a circular CCW toolpath, G42 will cut outside the toolpath, G41 will cut inside the toolpath. One thing that can be tricky is climb vs conventional cutting. Which method you're using will dictate whether you need G41/G42, as it determines the direction of the toolpath. The circular example above is using conventional cutting

Here's a little sample program that will show you how it works.

G40
M3
G0 Z0.1250
G0 X1.4629 Y1.2013 Z0.1250
G1 X1.4629 Y1.2013 Z0.0000 F25
G42P0.25
G1 X2.6956 Y2.0815 Z-0.2500 F50
G1 X8.2664 Y2.0815 Z-0.2500
G1 X8.2664 Y6.2744 Z-0.2500
G1 X3.4479 Y6.2744 Z-0.2500
G1 X3.4479 Y1.5214 Z-0.2500
G40
G1 X2.8556 Y0.9132 Z-0.2500
G0 X2.8556 Y0.9132 Z0.1250
G0 X0 Y0
M5
M30
Gerry

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

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

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Very basic question about tool diameter compensation
« Reply #7 on: August 07, 2008, 10:55:24 PM »
RChadwick,
1mm is a small endmill and it won't take much to snap it off when plunging or cutting. I use 1/32" (.031 dia and even 1/64") in my engraving machine and as you know they are not cheap. Keep depth cuts approx equal to 1/2 the diameter or less keeping chips out of the cutter path, better yet, experiment with an 1/8 end mill to gain some experience on the plexiglass ( goes for some of the other plastics also). Plexiglass is a pain to cut, it will wrap around that little bit and break it in a heartbeat. Need to keep the cutting cool using water, cold air gun, cutting fluid, to name a few.
 
When in doubt on how things will cut you can always dry run a program with a tooth pick in the chuck. They are cheap!
Have made a spring loaded tracer which uses ball point refills for checking out a pattern on paper.

Just a few things to think about.
RICH

Re: Very basic question about tool diameter compensation
« Reply #8 on: August 08, 2008, 12:19:39 AM »
Thanks for the comments Rich. I realize it's a very small end mill. Although I expected problems, my first one snapped almost immediately. I slowed the feed rate to next to nothing, and I managed to not snap them so often .Then, it was melting the plexiglas, making a mess. I solved that by making a clay lip around the work area, and filling it with water. I actually managed to get a decent quality cut. If anything, I'll need a smaller end mill to get the detail I'll probably need. I bought a few of those cheapie resharpened carbide cutters/drills available nearly everywhere, and it eases the emotional pain when they break :)

My biggest problem now, and likely my last hurdle, is to get Mach3 to take into account the diameter of the cutter, and have it go around the outside of the lines. I've taken a vacation from it tonight :)

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Very basic question about tool diameter compensation
« Reply #9 on: August 08, 2008, 04:43:59 AM »
It might be a bit late in the day (or the year, or in life) to try and get you interested in G Code, but it is very simple. The only trouble is that CAM programs write masses of it because they are so simple.

Each line of code is a move. All commands on a line are done simultaneously.
There are only two moves - G0 which is move fast - and G1 - which is move as fast as I tell you with the F command. There are other cutting moves, but I doubt your CAM program will do them - G2 and G3 - which cut circles.

If you are doing a shape - and you say you did one once - then you must know its dimensions. If you take the trouble to look at your GCode, and lay it out on graph paper, you will see the cuts follow, from one to the other, and all the GCode is telling the machine is where to go next (X and Y) and how high the cutter has to be (Z).

I take it you are using millimeters. So if your first cut is (starting at 0,0) G1 F5 X5, then the cutter is going to move to X5 - along the Y axis. Now if tool diameter compensation is applied by the cam - say for a 1mm cutter - then the Y axis must move from 0 to 0.5 first, and any subsequent moves will also be 1/2 milimeter offset or the inside of the shape if it is a pocket, or the outside if it is an island.

I am not suggesting that you now become a GCode buff - but have a look at the code and try to understand it a little. You will be suprised at how much you can decipher. All the umpteen other moves are to get the cutter to the right place to begin cutting and the only ones that mean anything at all are the G0 and G1.

You will see from the other answers that a lot of people are not certain how tool diameter compensation works - we could do with a comment from Graham Waterworth if he reads this - or pop a question on the GCode forum - and he might see it. He certainly knows his stuff.
Not me driving the engine - I'm better looking.