SlideShare a Scribd company logo
CNC Programming
Parts of a CNC program
• Just like a written letter to a friend or business
contact is comprised of three main parts
• salutation,
• body, and
• closing,
a CNC program is essentially broken into three similar
main parts:
• the salutation “program safe-start,”
• the body “material removal,”
• and the closing “program ending.”
CNC Programming
• There is no standardized format for writing a CNC
program that is compatible with all machine control
models.
• Each MCU manufacturer has developed its own
unique programming format.
• Each one has minor differences, but the principles
contained in the context of a program are the same
among them all.
• The programming examples provided in these slides
will relate the most closely to Fanuc-type controllers;
however, the principles may be applied to any
manufacturer’s programming format (see the
specific machine’s programming manual).
CODES
• Along with telling the machine what position to go to, the
programmer must also provide the machine with instructions
telling it what to do at that position.
CODES
G codes
M codes
Preparatory codes
Miscellaneous codes
CODES
G codes
M codes
Carry out machining
operations
Establish machine
settings
Control the machine
functions other than
tool movements
CODES
G codes
Carry out machining
operations
Establish machine
settings
G Codes - Axial Movements
G00 Rapid traverse
Moves the tool at a very fast rate to a
specified point
G01
Linear
interpolation
Machining in a straight line at a feed
rate
G02
Clockwise Circular
interpolation
Machining in a clockwise circular arc
at a given feed rate
G03
Counter-clockwise
Circular
interpolation
Machining in a counter-clockwise
circular arc at a given feed rate
G28
Return to machine
home position
(Rapid traverse) Moves the tool at a
very fast rate to the home position
Coordinate positioning : Radial
+X
- X
+Z
- Z
We will NOT use Radial
system for this course
Coordinate positioning : Diametral
+X
- X
+Z
- Z
We will use Diametral
system for this course
G Codes - Axial Movements
Tool
G00 Rapid traverse
Moves the tool at a very fast rate to a
specified point
G00 X30 Z5
Home Position
X30 Z5
40
+X
- X
+Z
- Z
G Codes - Axial Movements
Tool
G01
Linear
interpolation
Machining in a straight line at a feed
rate (one or more axes)
G01 X30 Z-20 F40
G00 X30 Z5
X30 Z-20
40
+X
- X
+Z
- Z
X30 Z5
Feed rate
G Codes - Axial Movements
Ø40 Ø30
35
G00 X30 Z5
G01 X30 Z00 F40
X40 Z-35
1
2
3
(Home  1)
(1  2)
(2  3)
Home
Position
+X
- X
+Z
- Z
G Codes - Axial Movements
G02
Clockwise Circular
interpolation
Machining in a clockwise circular arc
1
2
+X
- X
+Z
- Z
G02 X40 Z-25 R10
15
25
3
R10
G00 X20 Z5
G01 X20 Z-15 F40
Ø40 Ø20
Clockwise
Radius
G Codes - Axial Movements
G03
Counter-clockwise
Circular
interpolation
Machining in a counter-clockwise
circular arc
1
2
G03 X40 Z-25 R10
15
3
R10
G00 X20 Z5
G01 X20 Z-15 F40
Ø40 Ø20
25
Ø40 Ø20
+X
- X
+Z
- Z Counter-
clockwise
Radius
G Codes – Machine Setup
For Milling ONLY
G90 Absolute positioning
All coordinates are relative to the
reference position
(i.e. Workpiece Origin)
G91 Incremental positioning
All coordinates are relative to the
current position
For Turning ONLY
No need to write G code for the following in Turning
× Absolute positioning
Machine will run on Absolute Mode by
default
× Incremental positioning
U Incremental mode in X axis
W Incremental mode in Z axis
G Codes - Axial Movements
G28
Return to machine
home position
(Rapid traverse) Moves the tool at a
very fast rate to the home position
G28 U00 W00
Tool will
• move 00 in the X direction
and 00 in the Z direction
(incremental mode)
• and then will return to the
Home position
Incremental
mode in
X axis
Incremental
mode in
Z axis
Important point
Tool
Home
Position
40
+X
- X
+Z
- Z
G Codes – Machine Setup
G20 Imperial input Inch programming units
G21 Metric input
Millimetre programming units
G98 Feed per minute inches/millimetres per minute
G99 Feed per revolution inches/millimetres per rev
A
B
C
D
0
0
+Y
-Y
+X
-X
X Y
A
B
C
D
CODES
M codes
Control the machine
functions other than
tool movements
M codes : Group 1
M00 Program Stop utility stop for operator actions
M01 Optional Program Stop operator selected or ignored
M02 Program End
needs manual reset to start
again from the beginning
M30
Program End and
Rewind
stop and automatic reset
M codes : Group 2
M03 Spindle ON (Clockwise)
M04 Spindle ON (Anti-Clockwise)
M05 Spindle OFF
M06 Tool Calling
M08 Coolant ON
M09 Coolant OFF
Ø50 Ø40
Ø20
10
30
45
50
A
B
C
D
E
+Z
-Z
-X
+X
X40 Z-30
G00 X20 Z5
G01 X20 Z-10 F40
X40 Z-45
G02 X50 Z-50 R5
+Z
-Z
-X
+X
+Z
-Z
-X
+X
Roughing depth of
Cut
+Z
-Z
-X
+X
+Z
-Z
-X
+X
+Z
-Z
-X
+X
+Z
-Z
-X
+X
+Z
-Z
-X
+X
+Z
-Z
-X
+X
Material to be left
for finish pass
+Z
-Z
-X
+X
Material being
removed by
finishing pass
+Z
-Z
-X
+X
Roughing depth of
Cut
Material to be left
for finish pass
Canned Cycles
• Many turning operations require tedious and
redundant motions, such as the multiple passes
performed during a rough turning operation or
multiple pecks required for deep hole-drilling
operations.
• Machine control manufacturers have equipped the
controls with features that make these tedious
operations easier and faster to program.
• These machining routines can be packaged or
“canned” into one or two blocks of code and are
called canned cycles.
Stock Removal Turning Cycle : G71
• Function G71 is the stock removal cycle for turning
that removes metal along the direction of the Z axis.
In a case where there is a lot of material to be
removed, this cycle provides an easy method for
programming.
• There are two program blocks required for function
G71.
G71 U R
G71 P Q U W F
Block 1
Block 2
Stock Removal Turning Cycle : G71
G71 U R
G71 P Q U W F
Block 1
Block 2
depth of
roughing cut
(no sign)
amount of retract, along
the X axis, for each cut
block number where the
code for the contour
begins
block number where the
code for the contour
ends
amount of material for
finishing to be left on
all diameters
(X axis)
amount of material for
finishing to be left on
all faces
(Z axis)
roughing feed rate
Stock Removal Turning Cycle : G71
Depth of Cut U
Retract amount R
finish amount to be left
on the diameter U
finish amount to be left
on Z-axis faces W
+Z
- Z
+X
-X
10
25
75
50
90
R12.5
Rough Stock
diameter
62.5
Stock Removal Turning Cycle : G71
N30 G71 P40 Q80 U1 W1 F30
N10 G00 X95 Z5
N20 G71 U5 R0.5
N40 G00 X10 Z5
N50 G01 X10 Z-25
N60 X50 Z-62.5
N70 G02 X75 Z-75
N80 G01 X95 Z-75
Block 1
Block 2
Cycle
Blocks
Finishing Cycle : G70
G70 P Q F S
block number where the
code for the finishing contour
begins
block number where the
code for the finishing contour
ends
feed rate, effective for
blocks P through Q
spindle speed,
effective for blocks P
through Q
Stock Removal Turning Cycle : G71 and Finishing
Cycle G70
N30 G71 P40 Q80 U1 W1 F30
N10 G00 X95 Z5
N20 G71 U5 R0.5
N40 G00 X10 Z5
N50 G01 X10 Z-25
N60 X50 Z-62.5
N70 G02 X75 Z-75
N80 G01 X95 Z-75
Block 1
Block 2
Cycle
Blocks
G70 P40 Q80 F10 S1500
Finishing Cycle
Examples of Stock Removal Turning Cycle G71
program
•Refer to “CNC Lab Qs” pdf file
20
+X
- X
+Z
- Z
X12 Z2
Ø10
G21 G98 (Metric unit and feed in mm/min)
G28 U0 W0 (Go to home position)
M06 T0101 (Tool 1 & Offset 1)
M03 S2500 (Clockwise spindle at 2500rpm)
G00 X12 Z2 (Go to home position)
G94 X0 Z-2 F100 (Facing cycle)
Z-4
G28 U0 W0 (Go to home position)
M05 (Spindle stop)
M30 (Program end and rewind)
Facing Cycle : G94
P
( Home → P )
20
18
+X
- X
+Z
- Z
Z-2
X12 Z2
Ø10
G21 G98 (Metric unit and feed in mm/min)
G28 U0 W0 (Go to home position)
M06 T0101 (Tool 1 & Offset 1)
M03 S2500 (Clockwise spindle at 2500rpm)
G00 X12 Z2 (Go to home position)
G94 X0 Z-2 F100 (Facing cycle)
Z-4
G28 U0 W0 (Go to home position)
M05 (Spindle stop)
M30 (Program end and rewind)
Facing Cycle : G94
P
( Home → P )
20
18
+X
- X
+Z
- Z
Z-2
X12 Z2
Ø10
G21 G98 (Metric unit and feed in mm/min)
G28 U0 W0 (Go to home position)
M06 T0101 (Tool 1 & Offset 1)
M03 S2500 (Clockwise spindle at 2500rpm)
G00 X12 Z2 (Go to home position)
G94 X0 Z-2 F100 (Facing cycle)
Z-4
G28 U0 W0 (Go to home position)
M05 (Spindle stop)
M30 (Program end and rewind)
Facing Cycle : G94
P
( Home → P )
20
18
16
+X
- X
+Z
- Z
Z-2
Z-4
X12 Z2
G21 G98 (Metric unit and feed in mm/min)
G28 U0 W0 (Go to home position)
M06 T0101 (Tool 1 & Offset 1)
M03 S2500 (Clockwise spindle at 2500rpm)
G00 X12 Z2 (Go to home position)
G94 X0 Z-2 F100 (Facing cycle)
Z-4
G28 U0 W0 (Go to home position)
M05 (Spindle stop)
M30 (Program end and rewind)
Facing Cycle : G94
P
( Home → P )
Peck Drilling Canned Cycle G74
G74 R
G74 X Z Q F
total absolute Z-depth
amount of retract
peck increment
or
depth of cut in Z axis
Micrometre (µm)
Feed rate
X-axis hole location
(part centerline)
Clearance
Z
Q
R
Clearance
G74 R
G74 X Z Q F
Micrometre (µm)
Micrometre (µm)
Clearance
20
5000
1
Clearance
G74 R1
G74 X0 Z-20 Q5000 F50
Micrometre (µm)
Micrometre (µm)
Threading Cycle : G76
G76 P000000 Q R
G76 X Z P Q F
Block 1
Block 2
number of
finishing cuts
angle of
the thread
minor diameter
(Major Dia - 2*Thread Height)
Final end position of the
thread along the Z axis
Height of thread in
micron
(= 0.613*Pitch)
First pass depth of cut
feed rate (normally
equal
to the thread pitch).
Relief angle (to
retract it may be
require some
angle)
minimum cut
depth for rough
cut
depth of the final
pass
(finishing
allowance)
Micrometre (µm) in software
mm in machine
Micrometre (µm) in software
mm in machine
Micrometre (µm) in
software
mm in machine
Threading
Threading

More Related Content

Similar to 3 CNC Programming R2CNCCNCCNCCNCCNCCNC.ppsx (20)

PPT
CNC lathe programming for new learners of CNC
betong1
 
PPTX
MILL - TRAINING.pptx
ssuser2b6e89
 
PPT
cadcampart11.ppt
Tarun Maruvada
 
PDF
Mach4 mill-g code-manual
Eng-Ibrahim Tamimi
 
PPTX
CNC Programming.pptx
Manikandan602030
 
PPT
5 g-code
sundar sivam
 
PDF
G and m codes
snakeaye
 
PPT
CNC
illpa
 
PPTX
CNC Programming
rajguptanitw
 
PPT
5 g-code
alan tellez
 
PPT
cnc_codes_and_letters.ppt
MohammedAlobaidy16
 
PPT
CNC_LATHE.ppt
OmkarRaut61
 
PDF
Lecture 25.pdf
kprudhviraj5
 
PPT
5 g-code
Sanjeeb Mohapatra
 
PPT
CIMS Lab.ppt
1234173916
 
PDF
Computer numeric control cnc Machines.pdf
MuditK4
 
PPTX
CNC PART PROGRAMMING.pptx
AtharvaJagtap15
 
PPT
CNC Turning.ppt
HimanshuPathak368871
 
PDF
Chapter 4 cnc part programming
RAHUL THAKER
 
CNC lathe programming for new learners of CNC
betong1
 
MILL - TRAINING.pptx
ssuser2b6e89
 
cadcampart11.ppt
Tarun Maruvada
 
Mach4 mill-g code-manual
Eng-Ibrahim Tamimi
 
CNC Programming.pptx
Manikandan602030
 
5 g-code
sundar sivam
 
G and m codes
snakeaye
 
CNC
illpa
 
CNC Programming
rajguptanitw
 
5 g-code
alan tellez
 
cnc_codes_and_letters.ppt
MohammedAlobaidy16
 
CNC_LATHE.ppt
OmkarRaut61
 
Lecture 25.pdf
kprudhviraj5
 
CIMS Lab.ppt
1234173916
 
Computer numeric control cnc Machines.pdf
MuditK4
 
CNC PART PROGRAMMING.pptx
AtharvaJagtap15
 
CNC Turning.ppt
HimanshuPathak368871
 
Chapter 4 cnc part programming
RAHUL THAKER
 

Recently uploaded (20)

PDF
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
PDF
01-introduction to the ProcessDesign.pdf
StiveBrack
 
PDF
June 2025 Top 10 Sites -Electrical and Electronics Engineering: An Internatio...
elelijjournal653
 
PPTX
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
rr22001247
 
PPTX
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
PDF
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
PPTX
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
PPTX
CST413 KTU S7 CSE Machine Learning Neural Networks and Support Vector Machine...
resming1
 
PPTX
Kel.3_A_Review_on_Internet_of_Things_for_Defense_v3.pptx
Endang Saefullah
 
PPTX
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
PDF
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
 
PDF
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
PPTX
Computer network Computer network Computer network Computer network
Shrikant317689
 
PPSX
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
PPTX
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
 
PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
PDF
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
PPTX
Introduction to Python Programming Language
merlinjohnsy
 
PDF
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
 
PPTX
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
Rapid Prototyping for XR: Lecture 3 - Video and Paper Prototyping
Mark Billinghurst
 
01-introduction to the ProcessDesign.pdf
StiveBrack
 
June 2025 Top 10 Sites -Electrical and Electronics Engineering: An Internatio...
elelijjournal653
 
LECTURE 7 COMPUTATIONS OF LEVELING DATA APRIL 2025.pptx
rr22001247
 
Introduction to File Transfer Protocol with commands in FTP
BeulahS2
 
Rapid Prototyping for XR: Lecture 2 - Low Fidelity Prototyping.
Mark Billinghurst
 
Stability of IBR Dominated Grids - IEEE PEDG 2025 - short.pptx
ssuser307730
 
CST413 KTU S7 CSE Machine Learning Neural Networks and Support Vector Machine...
resming1
 
Kel.3_A_Review_on_Internet_of_Things_for_Defense_v3.pptx
Endang Saefullah
 
CST413 KTU S7 CSE Machine Learning Clustering K Means Hierarchical Agglomerat...
resming1
 
Rapid Prototyping for XR: Lecture 1 Introduction to Prototyping
Mark Billinghurst
 
13th International Conference of Security, Privacy and Trust Management (SPTM...
ijcisjournal
 
Computer network Computer network Computer network Computer network
Shrikant317689
 
OOPS Concepts in Python and Exception Handling
Dr. A. B. Shinde
 
Bitumen Emulsion by Dr Sangita Ex CRRI Delhi
grilcodes
 
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
Mark Billinghurst
 
FSE-Journal-First-Automated code editing with search-generate-modify.pdf
cl144
 
Introduction to Python Programming Language
merlinjohnsy
 
How to Buy Verified CashApp Accounts IN 2025
Buy Verified CashApp Accounts
 
Tesla-Stock-Analysis-and-Forecast.pptx (1).pptx
moonsony54
 
Ad

3 CNC Programming R2CNCCNCCNCCNCCNCCNC.ppsx

  • 2. Parts of a CNC program • Just like a written letter to a friend or business contact is comprised of three main parts • salutation, • body, and • closing, a CNC program is essentially broken into three similar main parts: • the salutation “program safe-start,” • the body “material removal,” • and the closing “program ending.”
  • 3. CNC Programming • There is no standardized format for writing a CNC program that is compatible with all machine control models. • Each MCU manufacturer has developed its own unique programming format. • Each one has minor differences, but the principles contained in the context of a program are the same among them all. • The programming examples provided in these slides will relate the most closely to Fanuc-type controllers; however, the principles may be applied to any manufacturer’s programming format (see the specific machine’s programming manual).
  • 4. CODES • Along with telling the machine what position to go to, the programmer must also provide the machine with instructions telling it what to do at that position.
  • 5. CODES G codes M codes Preparatory codes Miscellaneous codes
  • 6. CODES G codes M codes Carry out machining operations Establish machine settings Control the machine functions other than tool movements
  • 7. CODES G codes Carry out machining operations Establish machine settings
  • 8. G Codes - Axial Movements G00 Rapid traverse Moves the tool at a very fast rate to a specified point G01 Linear interpolation Machining in a straight line at a feed rate G02 Clockwise Circular interpolation Machining in a clockwise circular arc at a given feed rate G03 Counter-clockwise Circular interpolation Machining in a counter-clockwise circular arc at a given feed rate G28 Return to machine home position (Rapid traverse) Moves the tool at a very fast rate to the home position
  • 9. Coordinate positioning : Radial +X - X +Z - Z We will NOT use Radial system for this course
  • 10. Coordinate positioning : Diametral +X - X +Z - Z We will use Diametral system for this course
  • 11. G Codes - Axial Movements Tool G00 Rapid traverse Moves the tool at a very fast rate to a specified point G00 X30 Z5 Home Position X30 Z5 40 +X - X +Z - Z
  • 12. G Codes - Axial Movements Tool G01 Linear interpolation Machining in a straight line at a feed rate (one or more axes) G01 X30 Z-20 F40 G00 X30 Z5 X30 Z-20 40 +X - X +Z - Z X30 Z5 Feed rate
  • 13. G Codes - Axial Movements Ø40 Ø30 35 G00 X30 Z5 G01 X30 Z00 F40 X40 Z-35 1 2 3 (Home  1) (1  2) (2  3) Home Position +X - X +Z - Z
  • 14. G Codes - Axial Movements G02 Clockwise Circular interpolation Machining in a clockwise circular arc 1 2 +X - X +Z - Z G02 X40 Z-25 R10 15 25 3 R10 G00 X20 Z5 G01 X20 Z-15 F40 Ø40 Ø20 Clockwise Radius
  • 15. G Codes - Axial Movements G03 Counter-clockwise Circular interpolation Machining in a counter-clockwise circular arc 1 2 G03 X40 Z-25 R10 15 3 R10 G00 X20 Z5 G01 X20 Z-15 F40 Ø40 Ø20 25 Ø40 Ø20 +X - X +Z - Z Counter- clockwise Radius
  • 16. G Codes – Machine Setup For Milling ONLY G90 Absolute positioning All coordinates are relative to the reference position (i.e. Workpiece Origin) G91 Incremental positioning All coordinates are relative to the current position For Turning ONLY No need to write G code for the following in Turning × Absolute positioning Machine will run on Absolute Mode by default × Incremental positioning U Incremental mode in X axis W Incremental mode in Z axis
  • 17. G Codes - Axial Movements G28 Return to machine home position (Rapid traverse) Moves the tool at a very fast rate to the home position G28 U00 W00 Tool will • move 00 in the X direction and 00 in the Z direction (incremental mode) • and then will return to the Home position Incremental mode in X axis Incremental mode in Z axis Important point Tool Home Position 40 +X - X +Z - Z
  • 18. G Codes – Machine Setup G20 Imperial input Inch programming units G21 Metric input Millimetre programming units G98 Feed per minute inches/millimetres per minute G99 Feed per revolution inches/millimetres per rev
  • 20. CODES M codes Control the machine functions other than tool movements
  • 21. M codes : Group 1 M00 Program Stop utility stop for operator actions M01 Optional Program Stop operator selected or ignored M02 Program End needs manual reset to start again from the beginning M30 Program End and Rewind stop and automatic reset
  • 22. M codes : Group 2 M03 Spindle ON (Clockwise) M04 Spindle ON (Anti-Clockwise) M05 Spindle OFF M06 Tool Calling M08 Coolant ON M09 Coolant OFF
  • 23. Ø50 Ø40 Ø20 10 30 45 50 A B C D E +Z -Z -X +X X40 Z-30 G00 X20 Z5 G01 X20 Z-10 F40 X40 Z-45 G02 X50 Z-50 R5
  • 31. +Z -Z -X +X Material to be left for finish pass
  • 33. +Z -Z -X +X Roughing depth of Cut Material to be left for finish pass
  • 34. Canned Cycles • Many turning operations require tedious and redundant motions, such as the multiple passes performed during a rough turning operation or multiple pecks required for deep hole-drilling operations. • Machine control manufacturers have equipped the controls with features that make these tedious operations easier and faster to program. • These machining routines can be packaged or “canned” into one or two blocks of code and are called canned cycles.
  • 35. Stock Removal Turning Cycle : G71 • Function G71 is the stock removal cycle for turning that removes metal along the direction of the Z axis. In a case where there is a lot of material to be removed, this cycle provides an easy method for programming. • There are two program blocks required for function G71. G71 U R G71 P Q U W F Block 1 Block 2
  • 36. Stock Removal Turning Cycle : G71 G71 U R G71 P Q U W F Block 1 Block 2 depth of roughing cut (no sign) amount of retract, along the X axis, for each cut block number where the code for the contour begins block number where the code for the contour ends amount of material for finishing to be left on all diameters (X axis) amount of material for finishing to be left on all faces (Z axis) roughing feed rate
  • 37. Stock Removal Turning Cycle : G71 Depth of Cut U Retract amount R finish amount to be left on the diameter U finish amount to be left on Z-axis faces W +Z - Z +X -X 10 25 75 50 90 R12.5 Rough Stock diameter 62.5
  • 38. Stock Removal Turning Cycle : G71 N30 G71 P40 Q80 U1 W1 F30 N10 G00 X95 Z5 N20 G71 U5 R0.5 N40 G00 X10 Z5 N50 G01 X10 Z-25 N60 X50 Z-62.5 N70 G02 X75 Z-75 N80 G01 X95 Z-75 Block 1 Block 2 Cycle Blocks
  • 39. Finishing Cycle : G70 G70 P Q F S block number where the code for the finishing contour begins block number where the code for the finishing contour ends feed rate, effective for blocks P through Q spindle speed, effective for blocks P through Q
  • 40. Stock Removal Turning Cycle : G71 and Finishing Cycle G70 N30 G71 P40 Q80 U1 W1 F30 N10 G00 X95 Z5 N20 G71 U5 R0.5 N40 G00 X10 Z5 N50 G01 X10 Z-25 N60 X50 Z-62.5 N70 G02 X75 Z-75 N80 G01 X95 Z-75 Block 1 Block 2 Cycle Blocks G70 P40 Q80 F10 S1500 Finishing Cycle
  • 41. Examples of Stock Removal Turning Cycle G71 program •Refer to “CNC Lab Qs” pdf file
  • 42. 20 +X - X +Z - Z X12 Z2 Ø10 G21 G98 (Metric unit and feed in mm/min) G28 U0 W0 (Go to home position) M06 T0101 (Tool 1 & Offset 1) M03 S2500 (Clockwise spindle at 2500rpm) G00 X12 Z2 (Go to home position) G94 X0 Z-2 F100 (Facing cycle) Z-4 G28 U0 W0 (Go to home position) M05 (Spindle stop) M30 (Program end and rewind) Facing Cycle : G94 P ( Home → P )
  • 43. 20 18 +X - X +Z - Z Z-2 X12 Z2 Ø10 G21 G98 (Metric unit and feed in mm/min) G28 U0 W0 (Go to home position) M06 T0101 (Tool 1 & Offset 1) M03 S2500 (Clockwise spindle at 2500rpm) G00 X12 Z2 (Go to home position) G94 X0 Z-2 F100 (Facing cycle) Z-4 G28 U0 W0 (Go to home position) M05 (Spindle stop) M30 (Program end and rewind) Facing Cycle : G94 P ( Home → P )
  • 44. 20 18 +X - X +Z - Z Z-2 X12 Z2 Ø10 G21 G98 (Metric unit and feed in mm/min) G28 U0 W0 (Go to home position) M06 T0101 (Tool 1 & Offset 1) M03 S2500 (Clockwise spindle at 2500rpm) G00 X12 Z2 (Go to home position) G94 X0 Z-2 F100 (Facing cycle) Z-4 G28 U0 W0 (Go to home position) M05 (Spindle stop) M30 (Program end and rewind) Facing Cycle : G94 P ( Home → P )
  • 45. 20 18 16 +X - X +Z - Z Z-2 Z-4 X12 Z2 G21 G98 (Metric unit and feed in mm/min) G28 U0 W0 (Go to home position) M06 T0101 (Tool 1 & Offset 1) M03 S2500 (Clockwise spindle at 2500rpm) G00 X12 Z2 (Go to home position) G94 X0 Z-2 F100 (Facing cycle) Z-4 G28 U0 W0 (Go to home position) M05 (Spindle stop) M30 (Program end and rewind) Facing Cycle : G94 P ( Home → P )
  • 46. Peck Drilling Canned Cycle G74 G74 R G74 X Z Q F total absolute Z-depth amount of retract peck increment or depth of cut in Z axis Micrometre (µm) Feed rate X-axis hole location (part centerline)
  • 47. Clearance Z Q R Clearance G74 R G74 X Z Q F Micrometre (µm) Micrometre (µm)
  • 48. Clearance 20 5000 1 Clearance G74 R1 G74 X0 Z-20 Q5000 F50 Micrometre (µm) Micrometre (µm)
  • 49. Threading Cycle : G76 G76 P000000 Q R G76 X Z P Q F Block 1 Block 2 number of finishing cuts angle of the thread minor diameter (Major Dia - 2*Thread Height) Final end position of the thread along the Z axis Height of thread in micron (= 0.613*Pitch) First pass depth of cut feed rate (normally equal to the thread pitch). Relief angle (to retract it may be require some angle) minimum cut depth for rough cut depth of the final pass (finishing allowance) Micrometre (µm) in software mm in machine Micrometre (µm) in software mm in machine Micrometre (µm) in software mm in machine