0% found this document useful (0 votes)
245 views

CNC Programming

CNC programming involves preparing part programs using G and M codes to provide motion instructions for machining. Key codes include G00 for rapid linear movement, G01 for feed rate linear movement, and G02/G03 for clockwise and counterclockwise circular interpolation. Programs also use preparatory codes like G70-G94 for units and positioning, as well as miscellaneous codes like M03-M05 for spindle control and M07-M09 for coolant. An example program is provided to demonstrate these codes for machining a part profile on a lathe or mill.

Uploaded by

Mansingh Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
245 views

CNC Programming

CNC programming involves preparing part programs using G and M codes to provide motion instructions for machining. Key codes include G00 for rapid linear movement, G01 for feed rate linear movement, and G02/G03 for clockwise and counterclockwise circular interpolation. Programs also use preparatory codes like G70-G94 for units and positioning, as well as miscellaneous codes like M03-M05 for spindle control and M07-M09 for coolant. An example program is provided to demonstrate these codes for machining a part profile on a lathe or mill.

Uploaded by

Mansingh Yadav
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

CNC Programming

Lathe Axes Designation


Lathe Axes Designation
Lathe Axes Designation

Lathe
CNC Axes

+Z

+X
Milling

Spindle
Milling
CNC Programming
Preparation of CNC programs and proving them is
first step to machine the part.

CNC programs are also called part programs.

There are two types of codes are used in CNC


programming:

preparatory codes (G Codes)

miscellaneous codes (M codes)


CNC Programming

Motion Statements

G00 Linear Movement (rapid)


G01 Linear Movement (feed)
G02 Circular Movement (cw feed)
G03 Circular Movement (ccw feed)
CNC Programming
G00 Linear Movement (rapid)
Y

55

60

10 24

(0, 0) X
G00 X55 Y60
CNC Axes

+Z

+X

Tool at (25, 35)


G00 X0 Z35
G00 X0 Z0
CNC Programming
Initial Diameter = 10 mm G00 X4 Z1
Final Diameter = 6 mm G01 Z-8
Depth of cut = 1 mm
Width of cut = 8 mm G00 X5 Z1
G00 X 3
G01 Z-8
G00 X4 Z1
CNC Programming
G02 Circular Movement (Clockwise)
Y

G02 X34 Y0 I0 J-24

G02 X34 Y0 R24

10

24

(0, 0) X
CNC Programming

Preparatory NC Codes
G00 Linear Movement (rapid)
G01 Linear Movement (feed)
G02 Circular Movement (cw)
G03 Circular Movement (ccw)
G70 Inch units
G71 Metric units
G90 Absolute dimensions
G91 incremental dimensions
G94 Feed in mm/min
CNC Programming
(0, 55)
30
Y
35
34

18 20 28

X 58
G91
G01 X30 Y55 G01 X30 G01 X30
G01 X30 Y20 G01 Y20 G01 Y-35
G01 X48 Y20 G01 X48 G01 X18
G01 X48 Y0 G01 Y0 G01 Y-20
G01 X106 Y0 G01 X106 G01 X58
G01 X106 Y28 G01 Y28 G01 Y28
G01 X72 Y28 G01 X72 G01 X-34
CNC Programming

Miscellaneous NC Codes
M02 End of program
M03 Clockwise rotation of spindle
M04 Counter-clockwise rotation of spindle
M05 Stop rotation of main spindle
M07 Coolant on
M09 Coolant off
CNC Programming
Sample Program
N10 G71 G90 G94 G97 M03 M07 S500
N20 G01 X90 Y10 F200
N30 G02 X90 Y10 R20
N40 G00 X100 Y10
N50 G00 X80 Y0
N60 G91
N70 G01 X90 Y120
N80 G03 X40 Y0 R15
N90 G00 X20 Y20
N100 M05 M09
N110 M02
CNC Programming
CNC Programming
CNC Programming

You might also like