You are on page 1of 46

CNC Part Programming

CNC Part
Programming

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Topics Covered

• List the steps involved in the development of part program

• Methods of manual part programming

• Computer aided part programming

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Introduction

• Part programming is used to do the work by dividing it into part by a computer,


under the control of a numerical control computer program.

• It is very useful to prepare a program sheet with the help of a drawing sheet.

• Standardized format is used to feed all the data into the numerical control system.

• Programming is where all the machining data is compiled and where the data is
translated into a language which can be understood by the control system of the
machine tool.

• Manual part programming is used to solve simple tasks. It is difficult to solve


complex tasks by using manual part programming, so that the computer aided
part program is used to solve those complex tasks.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Fundamentals of Part Programming

• In order to prepare part programming, the programmer decides the order of the
machining operations required to produce a component.
• The total steps involved in the development of a part program are listed below:

Prepare the process


plan
Identify the machine
tool

Select the drive axes

Choose tools

Determine machining
parameters
Make job and tool set-
up plans

Decide the tool path

Write the part program

Test the program

Document the program

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Fundamentals of Part Programming

The total steps involved in the development of a part program are shown in the below
flow chart:

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Fundamentals of Part Programming

The total steps involved in the development of a part program are shown in the below
flow diagram: Process Planning

Machine Tool Selection

Drive Axes Selection

Cutting Tool Selection

Machining Parameters Planning


Steps for Part
Programming
Tool Path Planning

Job and Tool Set-up Planning

Part Programming

Testing the Part Program

Documentation of Part Program

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Process Planning

• The use of NC/CNC machine tools necessitates a detailed process planning of


steps involved in the machining of a component.
• The programmer makes a detailed study of the part drawing and prepares the
process plan.
The process plan consists of:
1. Sequence of operations
2. Machine tools used
3. Jigs and fixtures required
4. Tool type and size
5. Feed rates and spindle speeds
6. Coolant requirement

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Process Planning

• The following figure shows the process plan of the component.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Machine Tool Selection

• The machine tool may be selected according to the type of work and the
operations to be performed.
• The machine tools are broadly grouped into:
1. Positional(point-to-point)
2. Paraxial(Straight line)
3. Continuous path

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Machine Tool Selection

1. Positional machine tool (point-to-point):


• This tool is one, in which the slides are controlled in order to reach a particular
fixed coordinate position where machining is to take place.
• No machining occurs until the slide movement ceases.
• Slide displacements from one position to the next position can be slated by
reference to either:

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Machine Tool Selection

2. Paraxial machine tools (straight line):


• In this, the cutting process occurs while the machine slides are moving and the
movement path must follow a controlled route.

• If surfaces are to be machined at an angle to


the axes, the machine control unit (MCU) must
be capable of displacing the slides
simultaneously and at suitable rates of feed in
order to produce a cutter path at the desired
angle, as shown in the figure.

• An example of this tool is the milling of a


recess or a pocket.

• In this NC milling machines the operation


can be programmed by defining the path
step-by-step from A to B, etc.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Machine Tool Selection

3. Continuous path machine tools:


• This tool one in which the slide motion in more than one axis is controlled
continuously and simultaneously.
• The system enables profiles in two-dimensional or three-dimensional to be
contour-machined.
Examples: Milling, routing, die-sinking, turning and grinding machines.

The typical components obtained by continuous path turning and milling


operations are shown in the figure below:

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Drive Axes Selection

All the CNC machine tools rely on the axes system for defining the axes
motion.
The number of axes in the machine tool are specified under the heading 'P', 'C'
or 'L'.

Positional control in two axes.


2P Example: A drilling machine controlled in x- and y-axes but with the
spindle axis (z) manually controlled.

Line control of two axes for position and velocity.


2L Example: A milling machine equipped with line milling facilities in two
axes, x- and y-.

Positional control in two axes and line control in a third axis.


2P,
Example: A drilling machine controlled in the x- and y-axes with control
L
of feed rate and depth in the z-axis.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Drive Axes Selection

Line control of three axes for position and velocity.


3L Example: A milling machine equipped with linear feed rate facilities in
three axes. x-,y- and z-.

Continuous path control in two axes.


2C
Example: A lathe or a milling machine

2C, Continuous path control in two axes and line control for velocity and
L position in the third axis.

Continuous path control in four axes and line control along one axis.
Example: A milling machine having continuous path control in x- and y-
3C
axes and in two rotatory displacements of the table and linear control of
the spindle in the z-axis.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Cutting Tool Selection

• Selecting a cutting tool is a very important function, because many cuttings are
possible for a given operation.
• It is very important to select the right tool for the job based on the economy of
manufacturing.
• If accurate components are to be produced, then the machine control unit must be
able to compensate for the variations in cutter size.
• Compensation for the variation of the cutter diameter is manually registered on the
machine console dials by the operator.
• If it is necessary to modify the cutter path by the amount registered on the console,
then the provision is made at the program stage for the machine control unit. This is
called tool diameter compensation.
• When a cutter is either too long or short, the cutter path can be modified by dialing
the error and its direction(+ or -) on the console.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Machining Parameter Planning

• The appropriate process parameters have to be selected for a given cutting tool
and the operation selected to ensure that each cutting tool achieves the
maximum metal removal rate in roughing operations and the maximum
machined surface coverage in finishing operations.
• This can be done by increasing:
1.Cutting speed
2.Feed rate
3.Depth of cut
• The machine tool must be designed with sufficient power for driving the spindle
and feed mechanisms.
• The spindle speeds are suitable for the use of cutting tools employing cemented
carbide, or other hard tool materials.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Tool Path Planning

• A huge number of coordinates need to be


determined and fed into the machine control unit
with a sufficient degree of accuracy of a machine.
• In a continuous tool path, the coordinates of a
series of consecutive points on the contour are
supplied MCU.
• The tool path between the points may be in the
form of a series of straight lines, curves from a
circular arc, or curves from a parabolic arc.
• The capacity to perform these movements in
straight lines or curves, carefully computed to fit
the overall pattern of the curve is known as
interpolation.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Job and Tool Set-Up Planning

Two or more components can be set up side-by-side on the surface of the table
as shown in the figure, when the component and its locating fixture are small in
relation to the size of the machine table.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Job and Tool Set-Up Planning

• If the machine table can accommodate only one component, the machine
tools are designed with twin tables.
• One table is used for the component being machined, while the other table is
clear of the spindle and the machining area and on this table the operator sets
the unmachined component.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Job and Tool Set-Up Planning

• The number of tools needed for completing the


operations depends upon the complexity of the
job.
• The tool setting can be peed up with the use of
tools with indexing tool tips or throw-away tips.
• Six or eight tools may be adequate for the simple
drilling operations.
• The indexing turret used on drilling machines is
shown in the figure.
• The indexing movement is powered by a hydraulic
motor and employs a Geneva mechanism.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Part Programming

The part programmer is responsible for planning the sequence of machining steps
to be performed by CNC and to document in a special format.
There are two ways to program for CNC: These are:
1. Manual part programming
2. Computer-aided part programming

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Testing the Part Program

• In this step, the part program is tested before it is loaded on the machine control

unit for the production of a component.

• A trial run can be carried out with or without the tool or work piece to enable

visualization of movements taking place and of any collision possible between the

tool, the work piece and the clamping device.

• The program is run block by block, during the trial run.

• This is dynamic for eliminating the possibility of collisions during machining.

• Graphical simulation is also possible on the computer. It can be carried out at a fast

speed without much loss of time.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Documentation of Part Program

It is the essential task of CNC manufacturing.


It involves:
• Part drawing
• Process planning sheet
• Tools cards
• Setting card
• Programming sheet

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Manual Part Programming Methods

• Numerical control information is passed to the MCU in the block format.

• Each block of the NC data may be arranged differently, depending on the

control system requirements of the system configuration.

The four basic tape formats used for NC input are:

1. Fixed sequential format

2. Tab sequential format

3. Block address format

4. Word address format

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Manual Part Programming Methods

Fixed Sequential Tape Format:

• It is necessary for each NC block to be of the same length and to contain the
same number of characters.
• This restriction enables the block to be divided into sub-strings corresponding to
each of the data types.
• Since the block length is invariant, all values must appear.

Example: Even if feed and speed are the same for ten blocks of NC data, ‘f’ and
‘s’ must be coded in each block.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Manual Part Programming Methods

Block Address Tape Format:

• This eliminates the need for specifying redundant information in subsequent NC


blocks through the specification of a change code.

• The change code follows the blocks and the block and sequence number
indicates which values are to be changed relative to the preceding blocks.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Manual Part Programming Methods

Tab Sequential Tab Format:

• This uses a special symbol called the tab, to separate data values within a
brock.
• Two or more tabs following one another indicate that the data, which would
normally occupy null locations, is redundant and has been omitted.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Manual Part Programming Methods

Word Address Tape Format:

• It uses alphanumeric data specification


• Each data value is preceded by a letter, which indicates the type of data that
follows
• Hence, redundant information is merely omitted along with the appropriate
letter.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Computer Aided Part Programming

Manual part programming is difficult for complex jobs. To overcome this


problem, the computer aided part programming came into picture.

This program consists of two parts, they are:


1. Definition of work part programming
2. Specification of operation sequence and tool path

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Part Programming Languages

Today several part programming languages are used. Few of them are:

1. APT (Automatically Programmed Tools)

2. ADAPT(Adaptation of Automatically Programmed Tools)

3. EXAPT (Extended sub-set of Automatically Programmed Tools)

4. UNIAPT

5. PROMPT

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Part Programming Languages

APT: This was originated at the servomechanism laboratory of the Massachusetts


Institute of Technology (MIT).
ADAPT: This was developed by IBM and it was intended to provide many of the features
of APT while utilizing a smaller computer.
EXAPT: This was developed in Germany on the basis of the APT language.
UNIAPT: This was developed by the United Computing Corp. of Carson, California.
NC Cutting Tools: This was developed by weber NC system, Inc., of Milwaukee,
Wisconsin. It is designed for use with a variety of machine tools such as lathes,
machining centers, flame cutter and punch pressers.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

APT Language Structure

• APT is not only an NC language but also a computer program that performs the
calculations to generate cutter positions based on APT statements.

• There are four types of statements in the APT language, they are:
1. Geometry statements
2. Motion statements
3. Post-processor statements
4. Auxiliary statements
The APT language consists of different types of statements composed by:

Letters Numerals Punctuation Marks

A slash(/) divides a statement into two


sections. Example: GO/PAST

A comma(,) is used as a separator


between the elements in a statement
ABCDEFGHIJKLMN L1=LINE/P1, P2
0123456789
OPQRSTUVWXYZ An equal(=) sign is used for assigning an
entity to a symbolic name. Example:
Q1=15, 25, 80
The parentheses() are used for enclosing
the nested statements.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

APT Language Structure

Library Functions Symbols

ABS - Absolute value A symbol can be any combination


SQRT - Square root of six or fewer alphabetic and
SIN - Sine of the angle in degrees numeric characters.
TAN - Tangent of the angle in The first character is always an
degrees alphabetic character.
ASIN - Angle of Sine in degrees The symbol cannot be a key
word.
ACOS - Angle of Cosine in degrees
Example:
ATAN - Angle of Tangent in
degrees • P2
• L3
EXP - Exponential
• C5
LOG - Natural logarithm

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

These are used to define the geometric elements that comprises of work part.

Syntax: Symbol = geometry type/descriptive data

The statement is made up of three sections.

The symbol used to identify the geometric


element

The key word that identifies the type of


geometry element

The descriptive data that defines the element


precisely, completely and uniquely.

To specify a point: P1=POINT/3.0, -5.0, 1.0


To specify a line: L2=LINE/P1, P2
To specify a plane: PLANE/P2, P3, P5
To specify a circle: CIRCLE/CENTRE, P5, RADIUS, 3.0
©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

Point:
It has three coordinates, the x, y and, z-axes. The point is specified in the
following ways:

1. By the rectangular 2. By the intersection


co-ordinates: of two lines:
P1=POINT/3.0, 1.5, 0.0 P1=POINT/L1, L2

3. By the intersection of a line and


a circle:
P2=POINT/YLARGE, INTOF, L3, C1
P3=POINT/XLARGE, INTOF, L3, C1

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

Point:

• Any of the descriptive words-XLARGE, XSMALL, YLARGE, YSMALL, can be used to


indicate the relative position of the point.
• For point P2, XSMALL or YLARGE can be used.

4.By intersecting 5.In the center of


two circles: a circle:
P4=POINT/YLARGE, P6=POINT/CENTRE,
INTOF, C1, C2 C1
P5=POINT/YSMALL,
INTOF, C1, C2

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

Line:

• Lines are considered to be of infinite length and do not have a direction. The
following are the methods of definition:

1. By coordinates of 2. By two points:


two points: L1= LINE/P1,P2
L1=Line/2,1,0,5,3,0

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

Line:
3. By a point, tangent to a circle:
L1= LINE/P1, LEFT TANTO, C1
L2= LINE/P1, RIGHT TANTO, C1
The words LEFT and RIGHT are used by looking from the point toward the circle.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

Line:
4. By a point and the angle of the line to the x-axis or another line:
L3= LINE/P1, LEFT, ATANGL, 20
L4= LINE/P1, LEFT, ATANGL, 30, L3

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

Line:
5. By a point and being parallel to or perpendicular to another line:
L5= LINE/P2, PARLEL, L3
L6= LINE/P2, PERPTOL, L3

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Geometry Statements

Line:

6. By being a tangent to two circles:


L7 = LINE/LEFT, TANTO, C3, LEFT, TANTO, C4
L8 = LINE/LEFT, TANTO, C3, RIGHT, TANTO, C4
L9 = LINE/RIGHT, TANTO, C3, LEFT, TANTO, C4
L10 = LINE/RIGHT, TANTO, C3, RIGHT, TANTO, C4

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Motion Statements

These are used to describe the path taken by the cutting tool.

Syntax: Motion command/descriptive data

Example: GOTO/P4
GODLTA/1.0, 3.0, 0.0

Set-up commands

Motion Commands

Point-to-point motion Contouring motion


commands commands

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Post-Processor Commands

These functions are used to specify the machine tool functions.


These are described below.

• Coolant turns on, off.


COOLANT • Example: COOLNAT/ON, COOLANT/OFF,
COOLANT/FLOOD, COOLANT/MIST

• It is used to specify the feed rate in mm per


FEDRAT minute
• Example: FEDRAT/100.0

• It is used lo stop the machine at the end of a


END
section of the program.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Post-Processor Commands

These functions are used to specify the machine tool functions.


These are described below.

• It is used to specify the machine tool and to call


MACHIN the post-processor for that machine tool.
• Example: MACHIN/MILL, 1

• It is used to specify the turret position on the


turret lathe or drill or to call a specific tool from
TURRET an automatic tool changer.
• Example: TURRET/T30

• It is used to specify the spindle speed in a


SPINDL revolution per minute.
• Example: SPINDL/3000

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Auxiliary Commands

These commands are used to prepare the computer for:


• Accepting the part program,
• Improve the readability of the part program
• Control the output of the computer.

CLPRNT FINI PARTNO

• It is used to obtain • It is used to • It is used at the


the computer indicate the end of start of program to
print, out of the the computer identify the part
cutter location program. program.
sequence on the
CNC tape.

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.
CNC Part Programming

Quiz
Test your Knowledge

©©Globarena
GlobarenaTechnologies
TechnologiesPvt.
Pvt.Ltd.
Ltd.All
Allrights
rightsreserved.
reserved.

You might also like