CNC Manual Part Programme
CNC Manual Part Programme
CNC Manual Part Programme
5”
2.5”
p4
p2 p3 p5
1”
(4, 4)
p1 Motion of tool:
p0 à p1 à p2 à p3 à p4 à p5 à p1 à p0
p0 (2, 2)
1. Set up the programming parameters
5”
2.5”
p4
p2 p3 p5
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
2. Set up the machining conditions
5”
2.5”
p4
p2 p3 p5
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
3. Move tool from p0 to p1 in straight line
5”
2.5”
p4
p2 p3 p5
Linear interpolation
1”
target coordinates
45°
(4, 4)
p1
p0 (2, 2)
4. Cut profile from p1 to p2
5”
2.5”
p4
p2 p3 p5
1”
Linear interpolation
5” target coordinates
p0 (2, 2)
5”
2.5”
p2 p3
p4
p5 Linear interpolation
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)
1”
6. Cut along circle from p3 to p4
5”
2.5”
p4
p2 p3 p5
1”
5”
target coordinates
5”
2.5”
p4
p2 p3 p5
1”
5”
Linear interpolation
p0 (2, 2)
8. Cut from p5 to p1
5”
2.5”
p4
p2 p3 p5
1”
5”
Linear interpolation
p0 (2, 2)
9. Return to home position, stop program
5”
2.5”
p4
p2 p3 p5
1”
Linear interpolation
45°
end of data
(4, 4)
N100 M00
p1
N5 M12
N10 T0101
N15 G0 X100 Z50
N20 M3 S600
N25 M8
N30 G1 X50 Z0 F600
N40 Y-30 F200
N50 X80 Y-20 F150
N60 G0 X100 Z50
N70 T0100
N80 M5
N90 M9
N100 M13
N110 M30
Code Explanation
N5 Clamping workpiece
N10 Changing No.1 tool and executing its offset
N15 Rapidly positioning to A point
N20 Starting the spindle with 600 r/min
N25 Cooling ON
N30 Approaching B point with 600mm/min
N40 Cutting from B point to C point
N50 Cutting from C point to D point
N60 Rapidly retracting to A point
N70 Cancelling the tool offset
N80 Stopping the spindle
N90 Cooling OFF
N100 Releasing workpiece
N110 End of program, spindle stopping and Cooling OFF
CNC MILLING EXAMPLE
N5 G90 G71
N10 T1 M6
N15 G92 X-100 Y86 Z95
N20 G0 X0 Y0 S2500 M3
N25 Z12.5
N30 G1 Z-12.5 F150
N35 X-20 Y30
N40 G2 X10 Y100 R80
N45 G1 X140 Y60
N50 G2 X150 Y0 R50
N55 G1 X0 Y0
N60 G0 Z12.5
N65 G91 G28 Z0 M5
N70 G91 G28 X0 Y0
N75 M30
CODE EXPLANATION
N5 absolute positioning, metric unit
N10 tool change to T1
N15 define work zero point at A
N20 rapid traverse to A, spindle on (2500 RPM, CW)
N25 rapid plunge to 12.5 mm above Z0
N30 feed to Z-12.5, feed rate 150 MMPM
N35 cut line AB to B
N40 cut arc BC to C
N45 cut line CD to D
N50 cut arc DE to E
N55 cut line EA to A
N60 rapid retract to Z12.5
N65 reference point return in Z direction, spindle off
N70 reference point return in X and Y directions
N75 end of program
SAMPLE PROGRAM ON DRILLING
N1 T16 M06
N2 G90 G54 G00 X0.5 Y-0.5
N3 S1450 M03
N4 G43 H16 Z1. M08
N5 G81 G99 Z-0.375 R0.1 F9.
N6 X1.5
N7 Y-1.5
N8 X0.5
N9 G80 G00 Z1. M09
N10 G53 G49 Z0. M05
N11 M30
CODE EXPLANATION