CNC Manual Part Programme

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

Manual Part Programming Example

5”
2.5”
p4
p2 p3 p5

1”

Tool size = 0.25 inch,


5” Feed rate = 6 inch per minute,
Cutting speed = 300 rpm,
Tool start position: 2.0, 2.0
Programming in inches
45°

(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

Use full-circle interpolation


5”
Feed rate

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

5” N030 G01 X3.875 Y3.698

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

N040 G01 X3.875 Y9.125


45°
or
(4, 4)
p1 N040 G01 Y9.125

p0 (2, 2)

X-coordinate does not change è no need to program it


5. Cut profile from p2 to p3

5”
2.5”
p2 p3
p4
p5 Linear interpolation

target coordinates
1”

N050 G01 X5.634 Y9.125

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”

circular interpolation, CCW motion

5”
target coordinates

45° N060 G03 X7.366 Y9.125 I6.5 J9.0

(4, 4) coordinates of center of circle


p1

p0 (2, 2) N060 G03 X7.366 Y9.125 I0.866 J-0.125


7. Cut from p4 to p5

5”
2.5”
p4
p2 p3 p5

1”

5”

Linear interpolation

45° target coordinates (Y is unchanged)

(4, 4) N070 G01 X9.302


p1

p0 (2, 2)
8. Cut from p5 to p1

5”
2.5”
p4
p2 p3 p5

1”

5”
Linear interpolation

target coordinates (see step 3)


45°
N080 G01 X3.875 Y3.698
(4, 4)
p1

p0 (2, 2)
9. Return to home position, stop program

5”
2.5”
p4
p2 p3 p5

1”

Linear interpolation

5” target coordinates (see step 3)

N090 G01 X2.0 Y2.0 M30

45°
end of data
(4, 4)
N100 M00
p1

p0 (2, 2) program stop


10. Complete RS-274 program

N010 G70 G90 G94 G97 M04


N020 G17 G75 F6.0 S300 T1001 M08
N030 G01 X3.875 Y3.698
N040 G01 X3.875 Y9.125
N050 G01 X5.634 Y9.125
N060 G03 X7.366 Y9.125 I0.866 J-0.125
N070 G01 X9.302
N080 G01 X3.875 Y3.698
N090 G01 X2.0 Y2.0 M30
Simple G Code Example CNC Lathe
PART PROGRAM

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

N1- Tool change (M06) to tool no.16


N2- Tool rapidly moves (G00) to first drilling position X0.5 Y-0.5 while taking into
account Zero-offset-no. 1 (G54)
N3- Drill starts rotating clockwise (M03) with 1450 rpm (S1450).
N4- Drill takes depth Z1. taking into account tool length compensation (G43 H16),
coolant is turned on (M08).
N5- Drilling cycle (G81) parameters, drill depth (Z) and cutting feed (F) are given,
with this command first drill is made at current position (X0.5 Y-0.5).
N6- As drilling cycle continues it’s work with every axis movement so next drill is
done at X1.5
N7- Third drilling hole at Y-1.5
N8- Fourth drill at X0.5
N9- Drilling cycle is cancelled (G80), Coolant is turned off (M09).
N10- Taking Machine-coordinate-system (G53) into account the drill is taken
to Z0 position. Tool length compensation is cancelled (G49), cutter rotation
is stopped (M05).
N11- CNC part-program is ended.
Typical PROGRAMMING - TURNING OPERATIONS

Write a part program for turning operations being carried out on a


CNC turning center. Let us take an exercise:
Figure shows the final profile to be generated on a bar stock by
using a CNC turning center. After studying the required part
geometry and features, the main program can be written as follows.

Figure A component to be turned.


81
82

You might also like