Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
255 views

CNC Lecture

The document provides information on CNC programming basics including: 1. Key letters used in programming like G, M, X, Y, Z codes and their functions. 2. Common G codes like G00, G01, G02, G03 for positioning and linear/circular interpolation and M codes like M03, M05 for spindle control. 3. Axis and sign conventions for turning operations. 4. Examples of part programs for facing and turning operations using G codes and canned cycles.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
255 views

CNC Lecture

The document provides information on CNC programming basics including: 1. Key letters used in programming like G, M, X, Y, Z codes and their functions. 2. Common G codes like G00, G01, G02, G03 for positioning and linear/circular interpolation and M codes like M03, M05 for spindle control. 3. Axis and sign conventions for turning operations. 4. Examples of part programs for facing and turning operations using G codes and canned cycles.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 16

CNC

Programming basics
Programming Key Letters
1. O - Program number (Used for program identification) 
2. N - Sequence number (Used for line identification) 
3. EOB - End of Block (;,Lf, *) 
4. G - Preparatory function 
5. M - Miscellaneous function
6. X - X axis designation 
7. Y - Y axis designation 
8. Z - Z axis designation 
9. R - Radius designation 
10. F - Feed rate designation 
11. S - Spindle speed designation 
12. T - Tool Designation 
Codes used…..
G code Function M code Function
G00 Positioning-Rapid M00 Program stop
Traverse
G01 Linear interpolation M01 Program optional stop
G02 Circular Interpolation- M02 Program end
CW
G03 Circular Interpolation- M03 Spindle on CW
CCW
G04 dwell M04 Spindle on CCW
G20 Input in inch M05 Spindle of
G21 Input in mm M06 Tool change
G28 Return to home position M08 Coolant on
G94 Canned cycle for M09 Coolant of
turning
G96 Feed in mm/min M30 Program end & rewind
G97 Feed in mm/rev M98 Subprogram call
Axis & sign conventions (Turning)
- ve

(0,0)

- ve Z +
ve

+
ve
Zero Points
Part/workpiece zero
Machine zero or machine home
position
 Reference zero
ø 50 mm

Workpiece zero

. . (0,0)

Reference zero
100 mm

Machine zero
.
2 mm

2 mm
Example
Initial blocks
 O 2016;
 N01 G21 G97;
 S1000 F0.5 T0203 M03;
 M08;
Format for program

N135 G01 X1.0 Y1.0 Z0.125 T01


F5.0
Coordinates
G-code

Tool
Block
number Special
number
function
Final blocks
 M05;
 M09;
 M02;
 G28 U0W0;
Part program for facing operation using G00& G01
code

Aim : To study facing operation using G00&


G01 code
 
Question: Write a part program for given job
to make its length 95 mm, using G00& G01
code.

Use:
 Depth of cut = 1.2 mm
 Tool no. = 04, ofset no. = 05
 Feed = 0.2 mm/rev.
ø 80 mm
5 mm

.
100 mm
O 2009;
N2 G 21 G 97 G 99;
N4 T0404 S 2000 M03;
N6 M08;
N8 G00 X82 Z2;
N10 G00 Z0;
N12 G01 X-1 F0.2;
N14 G00 X82 Z2;
N16 G00 Z -1.2;
N18 G01 X-1 F0.2;
N20 G00 X 82 Z2;
N22 G00 Z -2.4;
N24 G01 X-1 F0.2;
N26 G00 X 82 Z2;
G94 TURNING CYCLE
Rapid traverse (DOC) in ‘z’ Start point
axis

Feed
(cutting Feed
motion) (retrieval)
in ‘x’ in ‘x’ axis
axis

Rapid traverse in ‘z’ axis

Format (for step turning): Format (for taper turning):


G94 X__ Z__ F__ ; G94 X__ Z__ R__ F__
;
G90 TURNING CYCLE
Rapid traverse in ‘z’ axis Start point

Feed
(retrieva Rapid
l) traverse
in ‘x’ (DOC)
axis in ‘x’ axis

Feed (cutting motion) in ‘z’ axis

Format (for step turning): Format (for taper turning):


G90 X__ Z__ F__ ; G90 X__ Z__ R__ F__
;
DOC-1.5mm
N2 G 21 G 97 G 99;
N4 T0404 S 2000 M03;
N6 M08;
N8 G00 X57 Z2;
N12 G90 X52.0 Z-40.0 F0.25
N14 X50.0 Z-20.0
N16 X47.0
N18 X44.0
N20 X41.0
N22 X38.0
.
.
.
N30 X 20
N32 G28 U0W0;
N34 MO5;
N36 M09;
N38 M02;

You might also like