CNC Part Programming
CNC Part Programming
4.CNC
Part Programming
Turning
Drilling Milling
G - preparatory words
S - spindle speed
T - tool selection
M - miscellaneous command
G03
G02
N16 M06 T02 F200 S600 ;(T02 DRILLING TOOL DIA. 20 MM) 28-02-2020
2.)Write a part programming by using G codes and M codes for
N02 M03 M08 F200 S600 T01;(T01 DRILLING TOOL DIA. 8 MM)
N03 G00 X20 Y30 G43 H01 Z10;
N12 G00 G43 H02 Z10;
N04 G01 Z-10 F200; N13 G00 X90 Y10 M03 M08;
N05 G00 Z10; N14 G01 Z-10 F200;
N15 G00 Z10;
N06 G00 X20 Y60 ; N18 G00 X90 Y30 ;
N07 G01 Z-10 F200; N17 G01 Z-10 F200;
N18 G00 Z10 ;
N08 G00 Z10 ;
N19 G00 X0 Y0 G49 M05 M09 ;
N09 G00 X0 Y0 G49 M05 M09 ; N20 G28 U0 V0;
N21 M30;
N10 G28 U0 V0;
N11 M06 F200 S600 T02 ;(T02 DRILLING TOOL DIA. 6 MM)
using
MISS. NEEPA M. PATEL, MPSTME
G43/G49
28-02-2020
2.) Only Drilling operation. Assume Feed rate 200 mm/min. and
Spindle speed 600 rpm. W/P thickness 10mm.
N02 M03 M08 F200 S600 T01;(T01 DRILLING TOOL DIA. 8 MM)
N03 G00 X20 Y30 Z5; (5 mm offset distance)
N12 G00 Z5;
N04 G01 Z-10 F200; N13 G00 X90 Y10 M03 M08;
N05 G00 Z5; N14 G01 Z-10 F200;
N15 G00 Z5;
N06 G00 X20 Y60 ; N18 G00 X90 Y30 ;
N07 G01 Z-10 F200; N17 G01 Z-10 F200;
N18 G00 Z5 ;
N08 G00 Z5 ;
N19 G00 X0 Y0 M05 M09 ;
N09 G00 X0 Y0 M05 M09 ; N20 G28 U0 V0;
N21 M30;
N10 G28 U0 V0 ;
N11 M06 F200 S600 T02 ;(T02 DRILLING TOOL DIA. 6 MM)
Without
MISS. NEEPA M. PATEL, MPSTME
G43/G49
28-02-2020
2.) Milling and Drilling operation. Assume Feed rate 200 mm/min. and Spindle speed 600 rpm.
N14 M06 F200 S600 T02 ;(T02 DRILLING TOOL DIA. 6 MM)
N15 G00 G43 H02 Z10;
N16 G00 X90 Y10 M03 M08;
N23 M03 M08 F200 S600 T03;(T03 Drilling tool dia. 8 mm )
N17 G01 Z-10 F200; N24 G43 H01 Z10;
N18 G00 Z0; N25 G00 X20 Y30;
N26 G01 Z-10 F200;
N19 G00 X90 Y30 ; N27 G00 Z10;
N20 G01 Z-10 F200; N28 G00 X20 Y60 ;
N29 G01 Z-10 F200;
N21 G00 Z10 ; N30 G00 Z10 ;
N22 G00 X0 Y0 G49 M05 M09 ; N31 G00 X0 Y0 G49 M05 M09 ;
N32 G28 U0 V0;
N33 M30;
28-02-2020
12.)Develop a CNC program, using G and M code, to cut a slot for the
28-02-2020
53
28-02-2020
28-02-2020
MISS. NEEPA M. PATEL, MPSTME
16.) Write a manual part program for finishing component
http://www.helmancnc.com/g02-g03-g-code-circular-interpolation-example-program/
The program setup contains all the instructions that prepare the
machine for operation.
3. System shutdown
The system shutdown phase contains the G- and M-codes that turn
off all the options that were turned on in the setup phase.
1”
(4, 4)
p1 Motion of tool:
p0 p1 p2 p3 p4 p5 p1 p0
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
1. Set up the programming parameters
1”
Programming in inches
5”
Use absolute coordinates
Feed in ipm
45°
N010 G70 G90 G94 G97 M04
(4, 4)
p1
Spindle speed in rpm
p0 (2, 2)
Spindle CCW
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
2. Set up the machining conditions
1”
Machine moves in XY-plane
Spindle speed
45°
N020 G17 G75 F6.0 S300 T1001 M08
(4, 4)
p1
Tool no.
p0 (2, 2) Flood coolant ON
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
3. Move tool from p0 to p1 in straight line
Linear interpolation
1”
target coordinates
45°
(4, 4)
p1
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
4. Cut profile from p1 to p2 (Extra slides for
1”
Linear interpolation
5” target coordinates
target coordinates
1”
5”
y = 9 + 0.125 = 9.125
(6.5 - x)2 + 0.1252 = (1 - 0.125)2
x = 5.634
45° p3
(x, y)
(4, 4)
p1 (6.5, 9)
.125
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
1”
6. Cut along circle from p3 to p4
1”
5”
target coordinates
(4, 4)
coordinates of center of circle
p1
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
7. Cut from p4 to p5
5”
Linear interpolation
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
8. Cut from p5 to p1 (Extra slides for
1”
5”
Linear interpolation
p0 (2, 2)
MISS. NEEPA M. PATEL, MPSTME 28-02-2020
9. Return to home position, stop program (Extra slides for
1”
Linear interpolation
45°
end of data
(4, 4)
N100 M00
p1