You are on page 1of 17

Lesson Thirteen: Radius Compensation G40, G41, & G42

Radius Compensation G40, G41, & G42 (cutter radius
compensation for machining centers, tool nose radius compensation
for turning centers)
These features are commonly well covered in most basic CNC courses. However, basic
courses tend to stress how to use machining center cutter radius compensation in its
simplest form. And as experienced programmers know, you can be in for some surprises
when you apply it in more advanced applications. Here we introduce some rules not
commonly discussed in basic CNC courses and provide some suggestions for handling
the problems you can have.
Cutter radius compensation is one of the CNC machining center programmer’s most
helpful programming tools when it is properly applied. It keeps the programmer from
having to calculate the tool’s center line coordinates, it allows the easy specification of
roughing commands, and it allows a variety of cutter sizes to be used. If you work with
CNC machining centers, you have probably used this extremely helpful tool and know
these benefits first hand.
Yet there are many times when cutter radius compensation may not behave as expected.
If not correctly programmed, the control may cause odd motions or generate alarms. We
all dread cutter radius compensation alarms because they can be the most difficult alarms
to diagnose and correct. In some cases, the programmer may even be tempted to give up
on cutter radius compensation altogether and program centerline coordinates.
While programming centerline coordinates (without cutter radius compensation) is
sometimes the fastest way around a cutter radius compensation problem, it leaves the
programmer with a great deal of frustration. He or she will be hesitant to use cutter
radius compensation in the future. Because it can sometimes be frustrating to work with
this extremely useful tool, and because so many programmers give up on it prematurely,
we will give this lengthy presentation on how to handle problems with this important
control feature. This section will show you some of the reasons why you may have had
problems with cutter radius compensation in the past. You will also see how to avoid
problems with cutter radius compensation in the future.
The first point we want to make is this: There is nothing magical about how cutter
compensation behaves. There are logical and understandable rules that govern how cutter
compensation behaves for every CNC control. Though the rules may change slightly
based on the control manufacturer, every time cutter compensation behaves
unexpectedly, there is a logical reason and solution. If you understand the basic points
we make in this section, you should be able to solve most cutter radius compensation
problems. Your determination will be the key factor that determines how quickly you
can find and correct the problem.
The two ways to use offsets with cutter radius compensation
Before discussing possible cutter radius compensation problems, we will examine the two
ways by which the cutter radius compensation offset can be used. With one method, the
programmer generates the program using part surface coordinates in the program. This
method often times allows the programmer to use print dimensions, and is the method of
choice of most manual CNC programmers. In this case, the offset used with cutter radius
1

the offset must reflect the difference in radius from the one inch planned cutter size to the size actually being used. where the offset is the radius of the cutter. Using cutter radius compensation involves three basic programming steps. the offset will be 0. the offset value would be zero. Though there are some minor differences related to how each control manufacturer internally handles cutter radius compensation. the basic points we make in this section will apply to most current CNC controls. if the program were developed for a one inch diameter cutter.Lesson Thirteen: Radius Compensation G40. You can easily remember G41 and G42 if you know the 2 . For this reason. 1) Instate cutter radius compensation 2) Make movements to machine workpiece 3) Cancel cutter radius compensation Cutter radius compensation is instated with a command that tells the control how to position the cutter relative to the surfaces being machined throughout its movements. and bases the programmed coordinates on a planned cutter size. & G42 compensation represents the radius of the cutter for most CNC controls (though on some controls. Generally speaking. How cutter radius compensation works Understanding how your CNC control interprets cutter radius compensation commands will be your first step in solving any cutter radius compensation problem. For example.500 inch. If a one inch diameter cutter is not available.875 diameter cutter is actually used with the program. fewer problems present themselves when the value of the tool offset used with cutter radius compensation is kept small. Either the cutter will be positioned to the left of the surface (with a G41) or to the right of the surface (with a G42). and would be calculated accordingly. many CAM system programmers prefer to have their CNC programs created in this manner. the tool offset will be the difference in radius from the planned cutter size to the actual cutter size being used. the same basic rules will apply when you have problems. the diameter of the cutter input as the offset). and since CAM systems can generate cutter centerline coordinates as easily as workpiece surface coordinates. The second method of assigning offsets reduces the possible problems that are encountered with cutter radius compensation because the radius offset is kept smaller. This is evidenced by the fact that almost all cutter radius compensation alarms will go away if the offset value is set to zero. the programmer uses the cutter’s centerline coordinates in the program.0625 inch. the offset would be minus . For example. it does show that the cutter radius compensation problem is related to the size of the offset. If a one inch diameter cutter is used during machining. if you use the second method of assigning offsets (programming cutter center line coordinates). Since more problems occur when the offset used with cutter radius compensation is large. In this case. if a 0. G41. While this does not actually fix the problem. For example.500 in. However. since the radius or a one inch cutter is 0. With the second method.500 radius of the tool. all examples given in this section will be related to the first method of assigning offset values. all programmed dimensions would reflect the 0. if using a one inch diameter cutter.

The command to cancel cutter radius compensation is G40. In this example. For example. That is. you must first be able to visualize what is really happening while the cutter is making its movements around the surfaces being machined. 3 . each movement the control generates after cutter radius compensation is instated is based on the condition of how cutter radius compensation was instated (right or left).Lesson Thirteen: Radius Compensation G40. As you can see. climb milling is instated with G41 and conventional milling is instated with G42. the control is being told to keep the cutter on the left side of all programmed surfaces. These lines and circles represent the actual surfaces being machined. The next drawing shows the motions during a series of motion commands under the influence of cutter radius compensation. G41. & G42 difference between climb milling and conventional milling. Cutter radius compensation will remain in effect until cancelled. G02. the control lengthens the motion by the radius of the cutter. the size of the milling cutter (in the offset). and the coordinates used in the program. the cutter will be kept on the left side or right side of all motion commands until this cancellation. in the movement to point number two. In the motion to point number three. the control will keep the cutter to the left or right side of a series of lines and circles generated with straight line (G01) and circular (G02 and G03) commands. As stated. To begin to solve any cutter radius compensation problem. The motions will be adjusted automatically. the surfaces programmed are a series of lines and circles commanded by G01. and so on. If using a right hand cutter (spindle rotating clockwise with M03). the control cuts short the motion by a value equal to the radius of the cutter. Once instated. and G03 (and even G00).

each moving along only one axis. Indeed. & G42 Drawing shows motions under the influence of cutter radius compensation Though this drawing only illustrates straight line motions (G01). this is one of the main reasons for using cutter radius compensation in the first place. the same is true for circular motions. Notice how precisely the control can generate tangency points between angular and circular movements. G41. The next drawing shows that a CNC control can just as easily compensate for the radius of the cutter even with more complex shapes involving angular and circular motions. 4 . the motions in the previous drawing are quite simple. just a series of straight line motions. Also.Lesson Thirteen: Radius Compensation G40.

Either the control is unable to drive the cutter through your defined motions without violating the workpiece. but most will not even specify which command is actually causing the problem. While the actual wording for this alarm varies from one control to the next. The most common catch all alarm is the “over-cutting will occur” alarm. G41. This alarm is generated from more than one possible cause. most controls do very little to help you diagnose cutter radius compensation problems. here is a common definition: “Over-cutting will occur during cutter radius compensation”. the control is trying to tell you that the cutter will violate the programmed path (and usually the workpiece) if the program is allowed to 5 . Either the control will generate an alarm. Alarms and possible causes Most CNC controls handle cutter radius compensation problems with only a few cryptic alarms. Diagnosing the over-cutting alarm This is the most common alarm you will receive when working with cutter radius compensation. They may show you the general area of the program that is generating the alarm. or the actual motions generated by the program will not be as desired (probably scrapping a workpiece). it is also the most difficult cutter radius compensation alarm to diagnose. That is. When either of these two problems is encountered. or the motions commanded in the program are not possible. Whenever you receive this alarm. & G42 Drawing shows how cutter radius compensation works for more complicated motions Almost all cutter radius compensation problems stem from one of two possible causes. Because this alarm can be generated from a variety of problems.Lesson Thirteen: Radius Compensation G40. Let’s start by looking at those problems that generate alarms. one of two things will happen. stopping the program’s execution.

and since it could be the result of several problems. If it does. To send the tool to its approach position. If this happens. there may be times when the compensated motion along one surface will actually violate another. If you receive the over-cutting alarm early on in the cutter’s motion. it is one of the most feared alarms a CNC control can generate. it will not point you in any direction that will help you fix the problem or even tell you how the surface is being violated. For this reason. In this example. As the cutter size grows. the control will generate 6 . As stated. If you know them. there are several conditions that will cause this alarm.600 inch (1. you will be much better prepared to diagnose your specific problem. this would be the first thing to check.Lesson Thirteen: Radius Compensation G40. However. G41. the value in the tool offset must not exceed . Insufficient clearance for the cutter at the starting position Almost all CNC controls require that the cutter be at least the tool radius away from the surface you will be milling before you instate cutter radius compensation. & G42 run. the control will have to keep the generated centerline coordinates for the cutter farther and farther away from the surfaces to be machined. most controls will generate the over-cutting alarm. Depending on the contour. Most have to do with the size of the tool offset value as it relates to the surfaces being machined. The next drawing shows this relationship.200 diameter cutter). Drawing shows the relationship of the cutter with the workpiece at the cutter’s start point Offset value is too large All programs using cutter radius compensation will have limitations as to how large the cutter can be. centerline coordinates must be used. We sympathize with this dreadful feeling.

many times you will see a basic mistake related to this form of over-cutting problem. If you put the blueprint aside and plot coordinates to scale from the program. this over-cutting problem may not present itself the first time the program is run. First. The next drawing demonstrates this. as you attempt to solve any cutter radius compensation problem. you may be tempted to make certain assumptions about the correctness of your programmed coordinates. the blueprint can sometimes be very deceiving if it is not to scale. & G42 the over-cutting alarm before the violating motion occurs. the over-cutting alarm would occur. If viewing the blueprint. Drawing illustrates that the cutter is too large to fit into the recess. but this time the cutter size has been increased. Notice that this is the same series of motions shown in a previous example. It is possible for the program to have been run several times. G41. Second. then the operator may change cutter sizes (to a larger cutter) and then the over-cutting problem 7 . it helps to ignore the blueprint and use only the programmed coordinates as your way of viewing the motions. For this reason. actually drawing in the exact cutter size being used. It may not be apparent to the programmer (or operator) at the time the offset is entered that the tool to be used is be too large to fit into the recess of this part. since the program will behave properly if the offset is small enough to allow the programmed motion. In this case.Lesson Thirteen: Radius Compensation G40. You can use techniques similar to the drawing shown in the previous illustration. This can be the hardest kind of cutter radius compensation problem to find for two reasons.

Of course. the subsequent motions after the contour is machined should eventually cause this alarm. you must adhere to its rules. the operator is using a 1 in diameter end mill to mill a surface generated with cutter radius compensation. Beginners have the tendency to instate cutter radius compensation one time and then try to machine several separate contours without concern for the (rapid) motions from one contour to the next. the cutter becomes dull and has to be replaced. machine with it. Forgetting to cancel cutter radius compensation Once instated. After several workpieces. When machining multiple contours. Because the control is still under the influence of cutter radius compensation.25 diameter end mill. When the offset is changed to that needed for the 1. G41. an over-cutting alarm may be generated since an over-cutting problem may now crop up somewhere along the contour that did not occur with the smaller 1 in end mill. You must remember that cutter radius compensation remains in effect until cancelled. some very strange looking things can happen. However. the tool will not go to the correct coordinates to machine the hole.25 diameter end mill is used instead. By contour. you must consider the next series of cutting motions as a separate contour. Note that these problems can be eliminated if the programmer specifies the maximum cutter size on the setup sheet. Then go on to the next contour. the control will remain under the influence of cutter radius compensation and try to compensate cutter motions accordingly. you will be looking 8 . Even if no alarm is generated. we must warn you here. However. several commands could make up one contour. Say. While there are times when this will work (only by coincidence or cautious planning). for example. & G42 occurs. In this case. This means the control will continue to keep the tool on the left side or right side of all motions. in most cases the motions between contours will cause the over-cutting alarm. If the next tool is a drill (or any hole machining tool). so a 1. This can be a very difficult problem to diagnose. cancel it. In this case. Instate. the motions the control makes from one contour to the next will probably be incorrect. machine. you must instate cutter radius compensation.Lesson Thirteen: Radius Compensation G40. While moving from one contour to the next. the operator finds that there are no more 1 in end mills left in stock. One common cause for the over-cutting alarm is forgetting to cancel cutter radius compensation. if you have to rapid in X and Y to begin machining again. cancel. This must be repeated for each of the contours to be machined. It can sometimes be difficult to keep instating cutter radius compensation for every contour if there are many contours to be machined. cutter radius compensation must be cancelled. However. unless the programmer planned each motion carefully. Attempting to machine multiple contours under the influence of cutter radius compensation The biggest cutter radius compensation problem for beginners seems to be telling how much can be done with cutter radius compensation during one series of motions. and finally. If the subsequent motions do not break the rules of cutter radius compensation (only by shear coincidence). we mean a series of motions while the cutter remains in contact with the work. it is possible that the next tool (maybe a drill) will make motions still under the influence of the last tool’s cutter radius compensation. But to reap the benefits of cutter radius compensation. once cutter radius compensation is instated.

In this case. The next drawing shows an example. the cutter radius compensation offset value must be smaller than or equal to the radius to be machined. but its interpretation of what you want does not match your actual requirement. this can be the hardest kind of cutter radius compensation problems to find and diagnose. the maximum cutter size would be one inch in diameter. In some cases. For inside radii. For this reason. & G42 for the problem in the drill’s of commands. it can be hard to detect this kind of problem until after a workpiece is machined. Because the control is not generating any alarm. G41. there are other times when cutter radius compensation can behave poorly. 9 . Here are some things to watch for when using cutter radius compensation that may cause this kind of problem.” This alarm has to do with circular commands when machining an inside radius. Drawing illustrates that cutter radius must be smaller than smallest inside radius Other limitations of cutter radius compensation Unfortunately.Lesson Thirteen: Radius Compensation G40. but the motions are not correct. The control may be doing its best to interpret what you want. Though the wording varies from one control to the next. and because the amount of error in generated motion may be very small. You may not see that the problem is in the previous tool! Maximum cutter size exceeded alarm The second common alarm with cutter radius compensation is related to the maximum cutter diameter possible with inside radii. no alarm is generated. here is one popular definition: “Cutter diameter tool large for inside radius.

When the tool comes close to the weld flash (the joint of the weld itself). the look ahead buffer can become filled with non-pertinent data. based on whether an inside intersection. others will do their best to determine what you want. With directional vectors. While some controls will generate an alarm. With this type of control. Unfortunately. Angles under 90 degrees Some CNC controls (especially older controls) do not allow angles of under 90 degrees to be programmed. two consecutive moves in the same direction are easily possible. That is. an alarm will be generated. since there are times when this kind of motion is necessary. If non-motion data like feeds and speeds are programmed during cutter radius compensation. These three motions could all occur along the same motion direction. you would want to increase the feed and speed to their original values and continue. For this reason.) Once the weld flash area was cleared. The ending point for the current command will be different. If your control allows directional vectors (usually P and Q words). This can be frustrating. the easiest way around the problem is to program centerline coordinates (not using cutter radius compensation). there is a severe limitation with regard to change in motion direction. but motions may not be as desired. The look ahead buffer (especially for older controls) may be quite small. For cutter radius compensation. What will happen in this case can be difficult to predict. G41. outside intersection. or tangency is coming up relative to the next command. Current CNC controls have no limitation related to the size of an angle that can be generated. say you’re machining a weldment. this look ahead feature allows the control to select the ending point of the current command based upon what it sees in the next command. two consecutive motions in the same direction are not allowed. if you must use cutter radius compensation. 10 . the programmer is allowed to point in the direction of the next movement within the current command. we recommend keeping unrelated commands away from cutter radius compensation movements. For example. Note that some CNC controls allow something called directional vectors to be programmed within a cutter radius compensation commands. if you attempt to command a movement forming an angle under 90 degrees (forming an inside or outside surface) while under the influence of cutter radius compensation. & G42 Two moves in the same direction With most CNC controls. Non-motion commands during cutter radius compensation A CNC control is constantly looking ahead in the program to see what kind of motion is coming up next. With most CNC controls. In order to compensate correctly. on most controls. then continue machining the flash area. Every CNC control has a limited look ahead feature.Lesson Thirteen: Radius Compensation G40. the CNC control requires that some detectable change in motion direction occurs from one command to the next. you may want to slow the feed and speed. (The weld area is usually much harder than the workpiece material if the part has not been annealed. no change in speed and feed will be allowed since it will not be possible to make two consecutive movements in the same direction. and the control will not be able to calculate the end point of the current command correctly.

the workpiece will be badly violated. & G42 Reversal in motion direction There are times when you will be deceived during programming motions under the influence of cutter radius compensation. 11 . Look at the next drawing. Drawing shows a time when you may be tempted to program a reversal in motion directions Since the control will be keeping the tool on the right side of the surface programmed (in this case).Lesson Thirteen: Radius Compensation G40. G41. You might think that as you make the movement commands around this part. yet no alarm would occur. But reversing motion direction will not provide you the motions you desire. you could simply move to point three and immediately back to point two. Notice that the slot in this workpiece is the same width as the cutter diameter.

generating the desired cutter path. you must cancel cutter radius compensation with a G40 command. there are times when your last cutting motion may leave the cutter in a condition that makes you prone to making an error during the cancellation command. Hints on how to cancel cutter radius compensation After all cutting motions are completed. the program will execute properly. G41. the programmer would need to program the motions around the contour of the slot. However.Lesson Thirteen: Radius Compensation G40. The next drawing shows a series of motions generated by the program to follow. As long as the cutter is equal to or smaller than the slot width. 12 . & G42 Drawing shows what happens when you program a reversal of motion direction under the influence of cutter radius compensation In this case.

75 (Feed to point 4) N050 Y.1 (Rapid down to just above work surface) N020 G01 Z-. turn spindle on CW at 350 RPM) N010 G00 X0 Y2.5 (Feed to point 6) N060 Y2.0 (Feed to point 6) N030 X1.75 (Feed to point 5) N055 X0 Y1.299 Y.5 (Fast feed to work surface) N025 G41 D32 Y1. & G42 Drawing for example program Program: O0020 (Program Number) N005 G54 G90 S350 M03 (Select coordinate system.5 (Feed to point 3) N045 X-1.299 Y-.2 (Feed to point 7) N065 G40 (Cancel cutter radius compensation) N070 G91 G28 Z0 (Return to reference position in Z) N075 G91 G28 X0 Y0 (Return to reference position in X-Y) N080 M30 (End of program) 13 .5 F5.75 (Feed to point 1) N035 Y-.2 (Rapid to point 7) N015 G43 H01 Z.Lesson Thirteen: Radius Compensation G40. G41.75 (Feed to point 2) N040 X0 Y-1.

There is still stock to be removed on the last surface machined. the tool will continue to stay on the left side of the surface and the workpiece will not be machined correctly. & G42 Notice how the last motion of the program under the influence of cutter radius compensation (movement to point 7) is a clearance movement away from the workpiece. Drawing for example program to follow 14 . But since the motion is still under the influence of cutter radius compensation (compensation is not cancelled until line N065). only once a workpiece has been machined (and possibly scrapped) will this kind of problem present itself. preparing the program as we have shown. Many programmers will be deceived.Lesson Thirteen: Radius Compensation G40. To correct this problem you must understand how the control will interpret a cancellation command (G40) within a straight line motion command. most will bring the cutter’s centerline to the line generated by the canceling G01 motion as part of the last machining motion before the cancellation command is executed. This is hard to visualize. This kind of problem can be very difficult to foresee as you prepare to write the program. When the control sees the G40 within a G01 motion command. as the drawing shows. so the next drawing shows the motions generated by the corrected program to follow. Since this kind of problem will not be obvious even during a dry run. G41.

and finalize the cancellation of cutter radius compensation. this is difficult to visualize.2.5 (Feed to point 3) N045 X-1.75 (Feed to point 4) N050 Y. we encourage you to stick with it until you find the reason why cutter radius compensation is behaving poorly.5 (Feed to point 6) N060 G40 Y2. especially before the program is actually running at the machine. however. the problem areas we have discussed should point you in the right direction for those times when problems arise. one of the most important reasons for using cutter radius compensation is to allow for a range of cutter sizes.1 (Rapid down to just above work surface) N020 G01 Z-.Lesson Thirteen: Radius Compensation G40.299 Y. that the G40 command is now included with the movement to point 7. This time as the control looks ahead to line N060 (during the angular move in line N055).5 F5.299 Y-. Do you really need control based tool nose radius compensation? Many of the reasons for using cutter radius compensation on machining centers are not applicable to turning center tool nose radius compensation. While we could not hope to prepare you for every possible problem you could ever encounter with cutter radius compensation.0 (Feed to point 6) N030 X1. turn spindle on CW at 350 RPM) N010 G00 X0 Y2. With turning center tool nose radius compensation. During the actual motion in line N060.75 (Feed to point 5) N055 X0 Y1. For example. the control will continue to bring the cutter along the angular motion commanded by line N055 until its centerline is precisely on the (vertical) line generated by N060. G41. As stated. For this reason. they can use the cutter they do have. the 15 . & G42 Program: O0021 (Program Number) N005 G54 G90 S350 M03 (Select coordinate system.75 (Feed to point 1) N035 Y-. you will never truly master this very helpful and powerful feature.5 (Fast feed to work surface) N025 G41 D32 Y1. If the setup person doesn’t have a milling cutter of the specified diameter. But this kind of cancellation problem is a common one and one you will have to be prepared to deal with.2 (Cancel compensation during feed move to point 7) N065 G91 G28 Z0 (Return to reference position in Z) N070 G91 G28 X0 Y0 (Return to reference position in X-Y) N075 M30 (End of program) Notice in line N060. the cutter center will move to Y2.75 (Feed to point 2) N040 X0 Y-1. simply entering the correct value in the cutter radius compensation offset. in effect canceling the compensation for the X axis.2 (Rapid to point 7) N015 G43 H01 Z. If you come across problems with cutter radius compensation that you cannot seem to solve. If you are too quick to give up and go back to programming centerline coordinates. it will see the cancellation command (G40) within the next motion command.

another form of offsets (commonly wear offsets) is used to trial machine and hold size. it is cutter radius compensation on machining centers that that is used for trial machining and sizing with contour milling operations. If the contour isn’t coming out correctly. tool nose radius compensation is uninvolved. G41.) Machining on both sides of button tool One important exception exists to the previous discussion. by comparison. With turning center tool nose radius compensation. see the discussion of the G10 command to learn how to program the offset entries for tool nose radius compensation. and radius) surfaces being machined. About the only reason for really needing tool nose radius compensation is to keep the tangency point of the cutting tool perfectly flush with the (chamfered. you will be able to manipulate workpiece size by modifying the tool nose radius compensation value in the offset. In essence.Lesson Thirteen: Radius Compensation G40. many programmers that use computer aided manufacturing (CAM) systems eliminate the need for control based tool nose radius compensation (G41 and G42) by specifying that the CAM system output the tool path based upon the required tool nose radius. the cutter radius compensation offset can be changed. For the most part. While this is extremely important. This eliminates any problems you can have with tool nose radius compensation (like those discussed for cutter radius compensation) and keeps the setup person from having to enter tool nose radius compensation values in the offset table. If you are using are machining using both sides of the cutting tool’s radius. Also. tapered. & G42 programmer normally specifies the exact size of the required tool nose radius and the setup person must use a tool with precisely this radius. as is commonly done with button tools. (If you do use G41 and G42. The next drawing shows an example. the CAM system is performing the tool nose radius compensation. Drawing shows an example of when tool nose radius compensation can be used to help hold size 16 .

Lesson Thirteen: Radius Compensation G40. wear offsets are used to manipulate the size the cutting tool machines. For these operations. G41. the tool will be machining only on its leading edge. 17 . & G42 Note that with the vast majority of turning operations.