You are on page 1of 25

Computer Aided Manufacturing

MCL 784
Computer Aided Manufacturing

Part Programming
Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 1
Computer Aided Manufacturing

CNC Part Programming


CNC Part programming is a method of defining machine
tool movements through the application of numbers and
corresponding coded letter symbols.

PART Program contains all information for machining of a


component
Prepared by listing the coordinate values (X, Y, Z) for entire
tool paths as suited to machine the complete component.
Coordinate Values are prefixed with Preparatory Codes to
indicate the type of movement required (PTP, Straight, Circular)

Coordinates are suffixed with Miscellaneous codes for initiating


machine tool functions like start, stop, spindle movement etc.
Block of information - command for machine to execute.
Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 2
Computer Aided Manufacturing

What Programmer has to do?


Study relevant component drawing throughly
Identify the type of material to be machined
Determine specification and functions of the machine
Decide the dimension and mode - metric or inch
Decide coordinate system - Absolute / Incremental
Identify the plane of cutting
Determine the cutting parameters for the job/tool
combination
Decide the feed rate programming - mm/min or mm/rev
Establish sequence of machining operations

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 3


Computer Aided Manufacturing

What Programmer has to do?

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi


Computer Aided Manufacturing

Axes Reference

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 5


Computer Aided Manufacturing

Structure of a Part Program


Basic unit of a part program input to the control is called
a Block (made up of words)
A block may contain any or all of the following:
Optional block skip
Sequence or block number (N)
Preparatory functions (G)
Dimensional information (X, Y, Z, etc.)
Feed rate (F)
Spindle speed (S)
Tool number (T)
Tool offset function (D)
Miscellaneous functions (M)
End of block (EOB)

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 6


Computer Aided Manufacturing

Bock Example

Dimensional

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 7


Computer Aided Manufacturing

Preparatory Functions (G Codes)

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 8


Computer Aided Manufacturing

Example 1

N5 G71 (Metric)
N10 G90 (Absolute) N5 G90 X100 Y100
N15 G00 X100 Y100 N10 G91 (Incremental mode)
N20 X150 Y175 N15 G00 X20 Y40
N25 X200 Y125 N20 X50 Y60
N30 X250 Y150 N25 X100 Y80

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 9


Computer Aided Manufacturing

Miscellaneous Functions (M Codes)

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 10


Computer Aided Manufacturing

G02/G03 Circular Interpolation

The interpolation parameters together with the axis commands determine the
circle or arc
KA determined by the previous block
KE fixed by axis value in plane of interpolation
KM determined by - a) through interpolation parameters
b) by specifying circle radius
Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 11
Computer Aided Manufacturing

G02/G03 Circular Interpolation


Using Interpolation Parameters
The Circle centre is determined through the interpolation parameters:

Vector I parallel to X axis Magnitude of I, J, K are


incremental distances
Vector J parallel to Y axis
from circle start point to
Vector K parallel to Z axis centre point

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 12


Computer Aided Manufacturing

G02/G03 Circular Interpolation


Using Interpolation Parameters
Example

N5 G17 (X-Y Plane Selection)


N10 G90 (Absolute)
N15 G03 X17 Y30 I-9 J8 (Complete definition of circle)

N15 G03 X17 I-9 (Circle with missing addresses)

N15 G03 X17 Y30 I-9 J0 (If an interpolation parameter is not


programmed, Zero is assumed )

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 13


Computer Aided Manufacturing

G02/G03 Circular Interpolation


Example Using Interpolation Parameters

Absolute Mode
N5 G02 G90 X45 Y30 I0 J15 (Tool moves from point P2 to P1)
N5 G03 G90 X60 Y15 I15 J0 (Tool moves from point P1 to P2)

Incremental Mode N5 G02 G91 X-15 Y15 I0 J15


N5 G03 G91 X15 Y-15 I15 J0
Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 14
Computer Aided Manufacturing

G02/G03 Circular Interpolation


By Specifying the Radius
Starting point determined by the previous block
End point given by axis values
Centre defined by the signed radius P

Sign of radius P is according


to the size of traversing angle

P+ : angle <= 180

P- : angle > 180

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 15


Computer Aided Manufacturing

G02/G03 Circular Interpolation


Example By Specifying the Radius

N5 G02 G90 X45 Y30 P15 (Tool moves from point P2 to P1)

N5 G03 G90 X60 Y15 P15 (Tool moves from point P1 to P2)

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 16


Computer Aided Manufacturing

CNC Part Program Example


Y

Tool Diameter = 6 mm

N10 G00 X0 Y0

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 17


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 18


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0
N30 G01 Z-8

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 19


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0
N30 G01 Z-8
N40 G01 Z3

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 20


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0
N30 G01 Z-8
N40 G01 Z3
N50 G00 X10 Y-10

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 21


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0
N30 G01 Z-8
N40 G01 Z3
N50 G00 X10 Y-10
N60 G01 Z-3
Z

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 22


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0
N30 G01 Z-8
N40 G01 Z3
N50 G00 X10 Y-10
N60 G01 Z-3
N70 G01 Y-30 Z

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 23


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0
N30 G01 Z-8
N40 G01 Z3
N50 G00 X10 Y-10
N60 G01 Z-3
N70 G01 Y-30 Z
N80 G01 X32
X

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 24


Computer Aided Manufacturing

CNC Part Program Example


Y

X
N10 G00 X0 Y0
N20 G01 Z0
N30 G01 Z-8
N40 G01 Z3
N50 G00 X10 Y-10
N60 G01 Z-3
N70 G01 Y-30 Z
N80 G01 X32
N90 G02 X62 Y-30 I15 J0 X

Sunil Jha, Department of Mechanical Engineering, I.I.T. Delhi 25

You might also like