CNC Programming Examples - Chamfer Radius

CNC Mill Example Program G01 G02 G03 G90 G91

A CNC mill program for cnc machinists programmers, who have started to learning basic cnc programming techniques.

* Related books:

CNC Mill Example Program

CNC Program

        N40 G90 G00 X0 Y0
        N50 G01 X-10 Y-20 R8         (P1)
        N60 G01 X-50 R10             (P2)
        N70 Y10                      (P3)
        N80 X-19.97 Y25.01           (P4)
        N90 G03 X7.97 Y38.99 R18     (P5)
        N100 G01 X30 Y50             (P6) 
        N110 G91 X10.1 Y-10.1        (P7)
        N120 G90 G02 X59.9 Y20.1 R14 (P8)
        N130 G01 X70 Y10             (P9)
        N140 Y-20 R10                (P10)
        N150 X50                     (P11)
        N160 G03 X30 R10             (P12)
        N170 G01 X10 R8              (P13)
        N180 X0 Y0

G M S T Codes Explanation

Code Description
G00 Rapid traverse
G01 Linear interpolation
G02 Circular interpolation CW
G03 Circular interpolation CCW
G90 Absolute command
G91 Increment command

Haas Corner Rounding and Chamfering Example G01 C R

Haas Corner Rounding and Chamfering

Haas CNC program example to show how Chamfer and Corner Radius can be programmed.

Haas Chamfering

To program Chamfer
N10 G01 X20 Y30 ,C3

Haas Corner Rounding

To program Radius
N10 G01 X20 Y30 ,R3

Haas Corner Rounding and Chamfering Example

Haas CNC Program

            O1234 (Corner Rounding and Chamfering Example);
            T1 M6;
            G00 G90 G54 X0. Y0. S3000 M3; (P1)
            G43 H01 Z0.1 M08;
            G01 Z-0.5 F20.;
            Y40. ,R10.;            (P2)    
            X50. ,C5.;             (P3) 
            Y0.;                   (P4)
            G00 Z0.1 M09;
            G53 G49 Z0.;
            G53 Y0.;

Haas G M S T Codes

Code Description
G00 Rapid Motion
G01 Linear Interpolation Motion
G43 Tool Length Compensation +
G49 G43/G44 Cancel
G53 Non-Modal Machine Coordinate Selection
G54 Select Work Coordinate System l
G90 Incremental Programming
M3 Spindle On, Clockwise (S)
M6 Tool Change (T)
M08 Coolant On
M09 Coolant Off
M30 Program End and Reset
S Spindle speed
T Tool




Chamfer and Radius Program Example with G01

CNC programming example code to demonstrate, how to program a Chamfer and Radius (Corner Rounding) with G01 G-code.
Easy to program and understand that even a beginner level CNC machinist can understand and program such sample codes.
Mostly works on Fanuc and similar CNC controls.
No extra G-code or technique is required. Just have to put a “C” for chamfer and an “R” for Radius in a cnc program block with G01 G-code. Chamfer is at 45° (45 degrees).
For a brief description of how Chamfer and Corner Radius are programmed with G01 G code read following cnc programming article Chamfer and Radius Programming with G01 G code.
Another such program example is here G01 Chamfer and Corner Rounding a CNC Program Example

Chamfer and Radius with G01 G-Code

Chamfer and Radius Program Example with G01
                N40 G01 X26 Z53
                N50 G01 X26 Z27 R6
                N60 G01 X86 Z27 C3
                N70 G01 X86 Z0

G01 Chamfer and Corner Rounding a CNC Program Example

For a brief description of how Chamfer and Corner Radius are programmed with G01 G code read following cnc programming article
Chamfer and Radius Programming with G01 G code.
You might read other cnc example program articles, these cnc programming articles are a good cnc programming reference for cnc programmers/cnc machinists working on the shop floor.
  • CNC Programming for Beginners a Simple CNC Programming Example
  • CNC Programming Example in Inch Simple CNC Lathe Program
  • Lathe CNC Programming Example
  • CNC Milling Machine Programming Example for Beginners
  • CNC G02 Circular Interpolation Clockwise CNC Milling Sample Program
The following cnc program example shows how actually Chamfer and Radius are programmed with G01 in a cnc lathe program.

G01 Chamfer and Corner Rounding

CNC Programming Example of Chamfer and Corner Rounding with G01 G Code
                    N5 ……
                    N6 G00 X0 Z3
                    N7 G01 Z0 F0.2
                    N8 X35 C2
                    N9 Z-40 R4
                    N10 X55 Z-52 F0.1
                    N11 X75 C2
                    N12 Z-76
                    N13 G00 X100 Z50
                    N14 ……


Haas G71 Example Program

Haas cnc lathe uses one-line syntax of G71 roughing canned cycle.
This cnc program example shows the use of G71 turning cycle for ID roughing (Inside roughing).
You might like
  • G71 Rough Turning Cycle One-line Format
  • CNC Fanuc G71 Turning Cycle or Stock Removal Canned Cycle (Two-line format)
  • Fanuc G70 G71 Rough and Finish Turning Cycle Program Example
  • CNC Programming Example with Fanuc G71 Rough Turning Cycle and G70
In the below cnc programming example
1 – A boring bar is used for the whole the roughing operation with G71 Rough Turning Cycle.
2 – Same boring bar is used for finish cut with G70 Finishing Cycle.
Example of using a Haas G71 for I.D. Roughing and Finishing.

Haas CNC Program Example

Haas G71 Example Program
                        N1 T101
                        N2 G97 S2000 M03
                        N3 G54 G00 X0.7 Z0.1 M08
                        N4 G71 P5 Q12 U-0.01 W0.005 D0.08 F0.01
                        N5 G00 X4.5
                        N6 G01 X3. R.25 F.005
                        N7 Z-1.75 R.5
                        N8 X1.5 R.125
                        N9 Z-2.25 R.125
                        N10 X.75 R.125
                        N11 Z-3.
                        N12 X0.73
                        N13 G70 P5 Q12
                        N14 M09
                        N15 G53 X0
                        G53 Z0

Haas CNC Program Explanation

N1 – Tool 1 Offset 1
N3 – Rapid to start position
N4 – U is a minus for G71 I.D. Roughing
N5 – N5 is start of part path geometry defined by P6 in G71 line
N12 – N12 is end of part path geometry defined by Q12 in G71 line
N13 – G70 Defines a finish pass for lines P5 through Q12
N15 – To send machine home for a tool change


Fanuc CNC Program Example

Here is a cnc program example for Fanuc cnc control. This is a very simple and easy cnc program example also shows
  • Use of G02 Arc/Radius in Fanuc cnc program
  • Use of Chamfer in Fanuc cnc program
  • Use of G42/G40 Tool Nose Compensation
  • Use of G92 Maximum Spindle Speed
  • Use of G96 Constant Cutting Speed

Fanuc CNC Program Example

Fanuc CNC Program Code

                            N10 T2
                            N20 G92 S1200 M42
                            N30 G96 S150 M04
                            N40 G00 X-1 Z5 M08
                            N50 G01 Z0 G42 F0.2
                            N60 G01 X24 C2
                            N70 G01 Z-28
                            N80 G01 X32 Z-50
                            N90 G01 Z-56
                            N100 G02 X40 Z-60 R4
                            N110 G01 Z-75
                            N120 G01 X60 G40
                            N130 G00 X150 Z100
                            N140 M30

CNC Lathe Programming Example

A simple cnc lathe programming example. This cnc programming example will show how to program contours like chamfer taper grooves and arc.
This cnc program will use two tools for machining. The first tool used in this cnc programming example is a turning tooland the second one is a grooving tool.

CNC Machining

The turning tool will first face the component then it will make a chamfer, after that there is straight turning and then there is arc machining the arc may be machined with R (Radius of arc) or arc can be machined with I and K values of the arc, at the top of arc there is a chamfer, then again straight turning, now there comes the groove but we can’t make grooves with turning tools because of their shape so we will machine the groove with our next tool which is solely made for grooving operations, but at the time we are machining with turning tool so we will just skip this groove and will just machine in straight line, after that there is a taper and again a straight line to be machined.
Now with our grooving tool the groove machining task is just easy.
if the grooving insert is of the same size as the dimension of the groove then grooving is even more easy, we will make the groove in one go, but if the grooving insert is of smaller width than we have to take depth more than one time.

CNC Program

CNC lathe program example
                                N1 T01 D01 M491
                                N2 G00 X0 Z1
                                N3 G01 G96 G41 Z0 F2 S140
                                N4 G01 X2 CHF=0.125 F0.2
                                N5 G01 Z-1.125
                                N6 G02 X3.5 Z-1.875 CR=0.75
                                N7 G01 X3.75 CHF=0.125
                                N8 G01 Z-3.575
                                N9 G01 X5 Z-3.875
                                N10 G01 Z-4.6
                                N11 G00 X20 Z20 G40
                                N12 T02 D02 M491
                                N13 G00 G97 S500 X4 Z-2.825
                                N14 G01 X3.85 F1
                                N15 G01 X3.35 F0.15
                                N16 G01 X3.85 F0.5
                                N17 G00 X4
                                N18 G00 X20 Z20
                                N19 M30

Reference books