CNC Programming Examples - Boring CNC Lathe

Fanuc G71 G72 G70 Canned Cycle CNC Lathe Internal Machining Example (Boring & Facing)

* Best ebooks for CNC programming: 
CNC Programming Basics 
G-Code and M-Code 
CNC programming 
G-Code Reference 
CNC Machine Tutorial  

Fanuc programming example which shows the use of multiple fanuc canned cycle in cnc programming, Following canned cycle are used in this cnc lathe programming example

Fanuc G71 for Boring Opertaion

This programming example also illustrate how G71 turning cycle can be used for internal machining (boring operation). So if you want to remove extra stock from inside of a component, you can use Fanuc G71 turning cycle for internal stock removal as well.

Fanuc Programming Example

Fanuc Canned Cycle Example
        G28 U0 W0
        G50 S1500
        N1 T0101 M8 (OD FACING)
        G96 S180 M3
        G0 X255.0 Z5.0
        G72 W2.0 R0.5
        G72 P100 Q200 F0.25
        N100 G0 Z0 G41
        G1 X-2.0 F0.18
        N200 G0 Z5.0
        G28 U0 W0
        N2 T0404 M8 (ID ROUGH)
        G96 S180 M3
        G0 X50.0 Z5.0
        G71 U2.0 R0.5
        G71 P500 Q600 U-0.5 W0.1 F0.25
        N500 G0 X202.0 G41
        G1 Z0 F0.12
        N600 X50.0
        G0 Z5.0
        G28 U0 W0
        N3 T0505 M8 (ID FINISH)
        G96 S220 M3
        G0 X50.0 Z5.0
        G70 P500 Q600
        G0 X50.0 Z5.0
        G28 U0 W0
        M5 M9


CNC Lathe Basic Programming Example ID/OD Turning/Boring Operations (No Canned Cycle Used)

A full CNC programming example with ID/OD (Turning/Boring operations) for cnc machinists who work on a cnc lathe machine. A must to learn/practice for those who are learning cnc programming.
The added benefit of this programming example is that no cnc lathe canned cycle is used in this programming example.

CNC Lathe Basic Programming Example (Turning Boring Operations)

CNC Lathe Example Turning Boring
            N10 (ΓΈ30 DRILL) 
            G50 T0200
            G97 S250 M03
            G00 X0 Z5.0 T0202 M08
            G01 Z-5.0 F0.07
            Z-40.0 F0.25
            G00 Z5.0
            G01 Z-60.0
            G00 Z10.0
            X200.0 Z200.0 T0200
            N20 (Outside diameter stock removal) 
            G50 S1500 T0100
            G96 S180 M03
            G00 X94.0 Z5.0 T0101 M08
            G01 Z-14.8 F0.27
            G00 U2.0 Z0.5
            G01 X28.0 F0.23
            G00 X87.0 W1.0
            G01 Z-14.8 F0.27
            G00 U2.0 Z1.0
            G01 Z-14.1
            G02 X81.9 Z-14.8 R0.7
            G00 X100.5 W1.0
            G01 Z-29.8
            G00 U2.0 Z-1.0
            G01 X60.5 F0.23
            G00 X82.0 W1.0
            G01 X60.5
            G03 X80.5 Z-6.2 R3.8
            G00 U2.0 Z5.0
            X200.0 Z200.0 T0100
            N30 (Inside diameter stock removal) 
            G50 S1500 T0400
            G96 S180 M03
            G00 X34.5 Z3.0 T0404 M08
            G01 Z-41.8 F0.27
            G00 U-0.5 Z1.0
            G01 Z-15.0
            X34.5 Z-24.3
            G00 Z10.0
            X200.0 Z200.0 T0400
            N40 (Out diameter finishing) 
            G50 S1800 T0500
            G96 S200 M03
            G00 X63.0 Z5.0 T0505 M08
            G01 X38.0 F0.2
            G00 X60.0 Z3.0
            G42 Z1.0
            G01 Z-2.5 F0.2
            G03 X80.0 Z-5.5 R3.0
            G01 Z-13.5
            G02 X83.0 Z-15.0 R1.5
            G01 X100.0
            G40 G00 U2.0 W1.0
            G00 Z10.0
            X200.0 Z200.0 T0500
            N50 (Inside diameter finishing) 
            G50 S1800 T0600
            G96 S200 M03
            G00 X40.0 Z5.0 T0606 M08
            G41 Z1.0
            G01 Z-15.0 F0.2
            X35.0 Z-24.33
            G40 G00 Z10.0
            X200.0 Z200.0 T0600 M09

Fanuc Lathe Programming Example Using G70, G71, G74 for ID Machining

Fanuc lathe programming example which uses Fanuc canned cycle
  • G71 Turning Cycle
  • G70 Finish Cycle
  • G74 Peck Drilling Cycle
This Fanuc lathe programming example illustrates who to use G71 Turning cycle, G70 Finish cycle, G74 Peck drilling cycle for ID machining (Inside machining, boring operations)
  • Fanuc Lathe Programming Example
    • Tools & Oprations

Fanuc Lathe Programming Example

Fanuc Lathe Programming Example Using G71, G70 for ID Machining
N10 G40 G00
                N20 G99
                N30 M5
                N40 M9
                N60 T0101
                N70 G50 S3500
                N80 G96 S0240 M4
                N90 G00 X102. Z0.
                N100 G01 X-2. F0.15 M7
                N110 G00 X150. Z150.
                N120 M9
                N130 T0707
                N140 G97 S0950 M3
                N150 G00 Z3.
                N160 G00 X0.
                N170 G74 R1.0
                N171 G74 X0.0 Z-59.0 Q12000 R0.0 F0.2
                N350 G00 X150. Z150.
                N360 T0505
                N370 G50 S3500
                N380 G96 S0200 M4
                N390 G00 X23. Z2.
                N400 G71 U3. R1
                N410 G71 P420 Q530 U-0.5 W0.2 F0.3
                N420 G41 G00 X72.
                N440 G01 Z-21.
                N450 G03 X66. Z-24. I-3. K0.
                N460 G01 X54.
                N470 G02 X48. Z-27. I0. K-3.
                N480 G01 Z-41.
                N490 G03 X42. Z-44. I-3. K0.
                N500 G01 X30.
                N510 G02 X24. Z-47. I0. K-3.
                N520 G01 Z-59.
                N530 G01 X23.
                N540 G40
                N550 G00 X150. Z150. F0.3
                N560 T1111
                N570 G50 S4500
                N580 G96 S0380 M4
                N590 G41 G00 X72. Z2.
                N600 G70 P420 Q530
                N610 G40
                N620 G00 X23. Z2.
                N630 G00 X200. Z150.
                N640 M5
                N650 M30

Tools & Oprations

T0101 Turning Tool – Facing Operation
T0707 Tip Drill Tool – Drilling
T0505 Boring Bar – Internal machining (ID machining)
T1111 Boring Bar – Internal finish machining


CNC Lathe Programming Exercise Fanuc G71 Turning Cycle, G74 Peck Drilling Cycle

CNC programming exercise for cnc lathe machinists who work on Fanuc cnc control (or similar cnc control).
This cnc programming exercise use
Fanuc G71 Turning Cycle
Fanuc G74 Peck Drilling Cycle

CNC Lathe Programming Exercise

CNC Lathe Programming Exercise Fanuc G71, G74 Cycles
N10 G40 G00
                    N20 G99
                    N60 T0101
                    N70 G50 S3500
                    N80 G96 S0240 M4
                    N90 G00 X72. Z0.1
                    N100 G01 X-1.6 F0.12 M7
                    N110 G00 X150. Z150.
                    N120 M5
                    N130 M9
                    N140 T0303
                    N150 G97 S2500 M3
                    N160 G00 X0. Z3.
                    N170 G01 Z-6. F0.1 M7
                    N180 G00 Z2.
                    N190 G00 X150. Z150.
                    N210 T0707 M7
                    N220 G97 S0884 M3
                    N230 G00 Z3.
                    N240 G00 X0.
                    N250 G74 R1.0
                    N260 G74 X0.0 Z-68.326 Q18000 F0.22
                    N380 G00 X200.
                    N400 G00 Z100.
                    N500 T0404 M7
                    N510 G50 S3500
                    N520 G96 S0240 M4
                    N530 G00 Z1.
                    N540 G00 X70.
                    N550 G71 U4. R1
                    N560 G71 P570 Q650 U0.6 W0.2 F0.35
                    N570 G42 G00 X24.
                    N580 G01 Z0.
                    N590 G01 X28. Z-2.
                    N600 G01 Z-72.
                    N610 G02 X32. Z-74. I2. K0.
                    N620 G01 X62.
                    N630 G01 X68. Z-77.
                    N640 G01 Z-90.
                    N650 G40
                    N660 G00 X150.
                    N680 G00 Z70.
                    N690 T0202 M7
                    N700 G50 S4500
                    N710 G96 S0380 M4
                    N720 G00 X16. Z3.
                    N730 G42 G01 Z0. F0.1
                    N740 G01 X24.
                    N750 G01 X28. Z-2.
                    N760 G01 Z-72.
                    N770 G02 X32. Z-74. I2. K0.
                    N780 G01 X62.
                    N790 G01 X68. Z-77.
                    N800 G01 Z-90.
                    N810 G40
                    N820 G00 X150. Z150.
                    N830 M5
                    N840 M9
                    N850 M30

Used Tools & Operations

  • T0101 Turning Tool – Rough Facing
  • T0303 Center Drill – Center Drilling
  • T0707 Twist Drill – Drilling
  • T0404 Turning Tool – Rough Turning
  • T0202 Turning Tool – Finish Contour Cutting
Reference books