Programming, Cutter radius compensation.

Cutter radius compensation allows a program to be written without considering the size of the cutter being used.

Three G codes are used to control compensation G40, G41 and G42. They are group modal.

G40 cutter compensation off, centre line programming.

G41 cutter compensation to the left of the programmed path.

G42 cutter compensation to the right of the programmed path.

The axes that the compensation work in are dependent on the currently active plane.

The radius used for compensation is stored in the Tool Table and the correct tool must be active when the compensation is applied.

When compensation is active the machine calculates a tool path continuously parallel to the programmed path.

On external corners the control will add auxiliary movements to fill the gaps left in the parallel path. There is usually an option of whether these moves will be arcs or intersections of the path segments. This feature is normally controlled with G codes.

On internal corners there will be profile errors where the round cutter can not get into the sharp points.

It is usually possible to determine where the feedrate will apply, either at the point of contact with the programmed profile or the tool centre. This feature is normally controlled with G codes.

Programming moves smaller than the cutter radius usually results in either profile errors or machine errors.

Applying compensation should be done before getting to the profile as in the example below.

A) start and finish point

B) Cutter compensation on to the right hand side

C) Radius approach move

D) Profile

E) Radius away from the profile

F) Cutter compensation off move

A generic CNC program to machine this cut out in plastic on a router.

Note that all dimensions are in mm and the feedrate is in mm/min.

I would strongly suggest that a cycle is programmed to set the machine to a 'normal' condition and that cycle is the first thing done in any program. As cycles vary from control to control no further details will be put here.

N100 (MACHINE CUT OUT) [Program identity]

N110 (MACHINE NORMAL CYCLE GOES HERE) [Cycle to clear all switchable conditions]

N120 T1 M6 M3 S25000 [Activate tool 1, tool change and spindle start]

N130 G54 G0 X-60 Y150 [Activate zero shift 1, rapid move to start position]

N140 Z10 [Rapid down to clearance height]

N150 G42 G1 Y180 Z-2 F3000 M8 [Activate compensation to the right at feedrate and turn on coolant]

N160 G2 X-30 Y150 R-30 [Arc move to meet profile]

N170 G1 Y60 [Machine profile]

N180 G2 X-50 Y40 R-20

N190 G1 X-110

N200 G2 X-130 Y60 R-20

N210 G1 Y220

N220 G2 X-110 Y240 R-20

N230 G1 X-50

N240 G2 X-30 Y220 R-20

N250 G1 Y150 [Finish machining profile]

N260 G2 X-60 Y120 R-30 [Arc move away from profile]

N270 G40 G1 Y150 Z10 [Cancel cutter compensation and move out of the material]

N280 G53 G0 Z0 T0 M9 [Cancel zero shift and tool, turn coolant off and retract Z axis to machine zero]

N290 X0 Y0 [Move away from workpiece]

N300 M30 [End of program]


Back to programming page

Home