G40, G41, G41.1, G42, G42.1 (Cutter Radius Compensation)
To turn cutter radius compensation off, program G40. It is OK to turn compensation off when it is already off. Cutter radius compensation may be performed only if the XY plane is active.
To turn cutter radius compensation on the left (i.e., the cutter stays to the left of the programmed path when the tool radius is positive), program G41 D.... To turn cutter radius compensation on the right (i.e., the cutter stays to the right of the programmed path when the tool radius is positive), program G42 D.... The D-word is optional; if there is no D-word, the radius of the tool currently in the spindle will be used. If used, the D number should normally be the slot number of the tool in the spindle, although this is not required. It is OK for the D number to be zero; a radius value of zero will be used.
It is an error if:
- The D number is not an integer, is negative or is larger than the number of carĀousel slots
- The XY-plane is not active or for turning the ZX plane is not active
- Cutter radius compensation is commanded to turn on when it is already on.
The behavior of the machining center, when cutter radius compensation is on, is described in Appendix A.
With G41.1 D... is the same as G41 D... except now the D number is not a tool number but a tool diameter.
With G42.1 D... is the same as G42 D... except now the D number is not a tool number but a tool diameter.
This example mills out a rectangular object from the outside and inside.
On the outside, we use G42, tool radius compensation right and for the inside G41, tool radius compensation left is used.
For both contours, a tool-radius-compensation entry move is programmed consisting of a line that must be longer than the tool-radius used and a circle, of which also the radius is bigger than the tool.
As a side note, all arc radii should be bigger than the tool radius. If you have inside corners, there should always be an arc, so that the tool fits.
The G42, G41, and G40 codes are programmed with a / (block delete sign) in front. This makes it easy to debug tool comp programs. The program is loaded with the block delete, this is the blue curve.
Then the program is run with block delete off resulting in the yellow curve.
It is clear to see what the entry move does.
The movement starts at the right upper corner.
The blue line is the programmed contour. The yellow is the contour with tool-radius compensation G41.
The first G1 line is the tool comp entry move.
You can get this figure by putting a / character in front of the G41/G40 codes. The load the program with block delete on and execute it with block delete off. With block delete on the tool comp is skipped.
ļ»æ
The G42, G41, and G40 codes are programmed with a / (block delete sign) in front. This makes it easy to debug tool comp programs. The program is loaded with the block delete, this is the blue curve.
Then the program is run with block delete off resulting in the yellow curve.
It is clear to see what the entry move does.
ļ»æ