Cutter compensation G40, G41 & G42 for milling

Cutter Compensation (G40, G41 & G42)


Cutter compensation (G40, G41 and G42) has a few very useful applications. It makes a programmers job much easier by allowing a the freedom to change cutter diameters (up to an extent) without having to write a new program.

Eg1:
 G01 G41 Y100. F200 D21 ;

This will move the Y axis to 100mm while taking the cutter size into consideration.

So, if offset 21 is set at 10.00mm, the Y axis will only go to Y90.

G42 works exactly the same except it will compensate on the opposite side.

Eg2.
 G01 G42 Y100. F200 D21 ;

Generally speaking, this line will move the Y-axis to 100.00. With the addition of G42 and D21, the machine will read from offset 21 and compensate accordingly. So if offset 21 is set to 10.00, the machines Y-axis will only move to 90.00 as it compensates 10.00 for the D-offset.

Cutter compensation remains active on the program until the machine reads G40, at which time it will switch off cutter compensation until another G41 or G42 is activated.

**Note: When using Cutter compensation, the required offset is selected using the letter D, But when working with tool height, G43 followed by  H(offset number) should be used in order to indicate a Z-height.
 EG: G0 G43 Z100. H01 (this indicates that offset number 1 is assigned with the height for the current tool)

3 comments:

  1. Where do you define "D21"?
    I'm using a 1/16" bit and need to compensate for half the radius.
    Hope you can help.
    I'm using Mach3 as the machine software and no CAD or real CAM software, just Lazycam.
    Can I manually insert the metric value behind the "D", eg "D-.8" in the case of G42?
    or better example:
    G01 G42 X0.5 Y0.5 Z-0.5 D0.8 F15
    G41 G01 X10.0 Y25.0 D0.8

    Or do I need to write a post?

    Or is "D42" defined in Mach3? If so how?

    Thanks for any and all help.

    ReplyDelete
    Replies
    1. Hi, Sorry for the delayed response. I haven't updated this blog for a while, but I intend to keep it updated in the future.

      To answer your question, the D offset you use in the program would not use D-0.8, instead you would assign that tool a number, like 21 and then use D21 in the program like this:

      G01 G42 X0.5 Y0.5 Z-0.5 D21 F15
      G41 G01 X10.0 Y25.0 D21

      After that, you would go into the offsets screen on the CNC display and find number 21, then set that value to 0.8, then your machine uses that information once it reads D21 on your program.


      I hope this helps.

      Delete
  2. This comment has been removed by a blog administrator.

    ReplyDelete