0% found this document useful (0 votes)
189 views39 pages

Unit - III CNC Part Programming

The document discusses part programming for CNC machines. It covers the basics of manual and computer-aided part programming. Some key points include: - A part program is a sequence of instructions that describes the work to be done on a part in a format the CNC machine can understand. - Manual programming involves typing programs on a flexo writer while computer-aided programming uses CAD/CAM software. - Programs must include information like machining steps, cutting conditions, tool selection, startup procedures, tool motions, and ending the program. - Common elements in programs are axis designations, NC words, blocks of information, G and M codes, and tape formats. Canned cycles

Uploaded by

Narayana Perumal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
189 views39 pages

Unit - III CNC Part Programming

The document discusses part programming for CNC machines. It covers the basics of manual and computer-aided part programming. Some key points include: - A part program is a sequence of instructions that describes the work to be done on a part in a format the CNC machine can understand. - Manual programming involves typing programs on a flexo writer while computer-aided programming uses CAD/CAM software. - Programs must include information like machining steps, cutting conditions, tool selection, startup procedures, tool motions, and ending the program. - Common elements in programs are axis designations, NC words, blocks of information, G and M codes, and tape formats. Canned cycles

Uploaded by

Narayana Perumal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 39

Unit – III

CNC Part programming


INTRODUCTION:
The part program is a sequence of instructions, which describe the
work, which has to be done on a part, in the form required by a
computer under the control of a numerical control computer program.
It is the task of preparing a program sheet from a drawing sheet. All
data is fed into the numerical control system using a standardized
format.
The machining data is as follows:
(a) Machining sequence classification of process, tool start up point,
cutting depth, tool path, etc.

(b) Cutting conditions, spindle speed, feed rate, coolant, etc.

(c) Selection of cutting tools


While preparing a part program, need to perform the following
steps :
(a) Determine the startup procedure, which includes the extraction of
dimensional data from part drawings and data regarding surface quality
requirements on the machined component.

(b) Select the tool and determine the tool offset.

(c) Set up the zero position for the workpiece.

(d) Select the speed and rotation of the spindle.

(e) Set up the tool motions according to the profile required.

(f) Return the cutting tool to the reference point after completion of work.

(g) End the program by stopping the spindle and coolant.


TYPES OF PART PROGRAMMING :
(a) Manual part programming, and

(b) Computer aided part programming.

Manual Part Programming :


The programmer first prepares the program manuscript in a standard format.
Manuscripts are typed with a device known as flexo writer, which is also used to
type the program instructions. After the program is typed, the punched tape is
prepared on the flexo writer. Complex shaped components require tedious
calculations. This type of programming is carried out for simple machining parts
produced on point-to-point
machine tool.
To be able to create a part program manually, need the following information :
(a) Knowledge about various manufacturing processes and machines.
(b) Sequence of operations to be performed for a given component.
(c) Knowledge of the selection of cutting parameters.
(d) Editing the part program according to the design changes.
(e) Knowledge about the codes and functions used in part programs.
Computer Aided Part Programming:
If the complex-shaped component requires calculations to
produce the component are done by the programming software contained
in the computer. The programmer communicates with this system through
the system language, which is based on words. There are various
programming languages developed in the recent past, such as APT
(Automatically Programmed Tools), ADAPT, AUTOSPOT, COMPAT-II,
2CL, SPLIT is used for writing a computer programme, which has
English like statements. A translator known as compiler program is used
to translate it in a form acceptable to MCU.

The programmer has to do only following things :


(a) Define the work part geometry.
(b) Defining the repetition work.
(c) Specifying the operation sequence
Over the past years, lot of effort is devoted to automate the part
programme generation. With the development of the CAD (Computer
Aided Design)/CAM (Computer Aided Manufacturing) system, interactive
graphic system is integrated with the NC part programming.

Interactive Graphic System in Computer Aided Part Programming


FUNDAMENTAL ELEMENTS FOR DEVELOPING MANUAL
PART PROGRAMME:
1. Type of Dimensioning System

2. Axis Designation

The programmer also determines how many axes are availed on


machine tool. Whether machine tool has a continuous path and
point-to-point control system
3. NC Words
The NC word is a unit of information, such as a dimension or feed rate and
so on. A block is a collection of complete group of NC words representing
a single NC instruction.

Block of Information
NC information is generally programmed in blocks of words. Each word
conforms to the EIA standards and they are written on a horizontal line.
If five complete words are not included in each block, the machine
control unit (MCU) will not recognize the information
N001 – represents the sequence number of the operation.

G01 – represents linear interpolation.

X12345 – will move the table in a positive direction along the X-axis.

Y06789 – will move the table along the Y-axis.

M03 – Spindle on CW and

; – End of block.
A typical block of program may be written as:
4. Standard G codes and M codes.
5. Tape program format.
Both EIA and ISO use three types of formats for compiling of NC data
into suitable blocks of information with slight difference.

Word Address Format:


This type of tape format uses alphabets called address, identifying the function
of numerical data followed. This format is used by most of the NC machines,
also called variable block format. A typical instruction block will be as below :
N20 G00 X1.200 Y.100 F325 S1000 T03 M09 <EOB>
or
N20 G00 X1.200 Y.100 F325 S1000 T03 M09;
The MCU uses this alphabet for addressing a memory location in it.
Tab Sequential Format:
Here the alphabets are replaced by a Tab code, which is inserted between two
words. The MCU reads the first Tab and stores the data in the first location then
the second word is recognized by reading the record Tab. A typical Tab sequential
instruction block will be as below :
>20 >00 >1.200 >.100 >325 >1000 >03 >09
Fixed Block Format :
In fixed block format no letter address of Tab code are used and none of words can
be omitted. The main advantage of this format is that the whole instruction block
can be read at the same instant, instead of reading character by character. This
format can only be used for positioning work only. A typical fixed block instruction
block will be as below:
20 00 1.200 .100 325 1000 03 09 <EOB>
6. Machine Tool Zero Point Setting

7. Coordinate Word
8. Parameter for Circular Interpolation
9. Spindle Function

10. Feed Function


11. Tool Function
12. Work Settings and Offsets
13. Rapid Positioning
This is to command the cutter to move from the existing point to the target point
at the fastest speed of the machine

14. Linear Interpolation

This is to command the cutter to move from the existing point to the target
point along a straight line at the speed designated by the F address.
15. Circular Interpolation
this is to command the cutter to move from the existing point to the target
point along a circular arc in clockwise direction or counter clockwise direction.
The parameters of the center of the circular arc is designated by I, J and K
addresses. I is the distance along the X-axis, J along the Y, and K along the Z.
SYMBOLS USED:

% – Main Programme (1 to 9999)


L – Sub program (1 to 999)/Home position
N – Sequence of block number.
Lf – Block end (EOB) means “; or *”
T – Tool number or Tool station number
D – Tool offset
S – Spindle speed
F – Feed
M – Switching function
G – Transverse commands
R – Parameters
I, J, K – Circle parameters
B/U/R – Radius
X/Y/Z – Axis coordinates
P – Passes.
FIXED CYCLE:
Machining holes is probably the most common operation, mainly done on CNC
milling machines and machining centers. Even in the industries traditionally
known for their complex parts, such as aircraft and aerospace components
manufacturing, electronics, instrumentation, optical or mold making industries,
machining holes is a vital part of the manufacturing process.

A fixed cycle is a combination of machine moves resulting in a particular


machining function such as drilling, milling, boring and tapping. By
programming one cycle code number, as many as distinct movements may
occur. These movements would take blocks of program made without
using Fixed or Canned cycles. The corresponding instructions of a fixed
cycle are already stored in the system memory.
The advantages of writing a part program with these structures are:

(a) Reduced lengths of part program.


(b) Less time required developing the program.
(c) Easy to locate the fault in the part program.
(d) No need to write the same instructions again and again in the
program.
(e) Less memory required in the control unit

Example
01 (G81 Drilling Cycle) (All dimensions are in mm).
R00 – Dwell time at the starting point for chip removal.
R02 – Reference plane absolute with sign.
R03 – Final depth of hole absolute with sign.
R04 – Dwell time at the bottom of drilled hole for chip breaking.
R10 – Retract plane without sign.
R11 – Drilling axis number 1 to 3
N5 G17 G71 G90 G94 G55;
N10 T1 L90;
N15 G00 D5 Z5 M3 S600 X27 Y27;
N20 G81 R02=5, R03=-33, R11=3, F50 M7;
N25 X97;
N30Y97;
N35 X27;
N40 G00 G80 Z100 M9;
N45 M02;
DO-LOOPS:

In a few jobs some portion of the program needs to be repeated, which


do not fit into standardized category. Some of the non-standardized
cycles are Do-loops and Subroutines. Do-loop is a number of
operations repeated over a number of equal steps for a previously fixed
number of times.

Do-loops always are implemented on incremental mode because each


previous position becomes reference for next iteration. Do-loop is
actually jumping back to an already written initial portion of the
program for the number of times a loop count.
Example
01 (Do-loop) (All dimensions are in mm).
N2 G71 G90 G94;
N4 G92 X0 Y0 Z0 ;
N6 T1 M06;
N8 G81 G99 X5 Y10 Z-8 R.2 F100 S500 M03 M08; (Canned Drill cycle)
N10 G51 P4; (Start loop 4 times)
N12 G91 X 10 ;
N14 G50 ;
N16 G80 G90 M09; (Cancel cycle)
N18 T2 M06 ;
N20 G81 G99 X5 Y10 Z-8 R.2 F100 S500 M03 M08; (Canned Drill cycle)
N22 G51 P4 ; (Start loop 4 times)
N24 G91 X 10 ;
N26 G50;
N28 G80 G90 M09; (Cancel cycle)
N30 M30
SUBROUTINE:
A subroutine is a portion of a program, complete in itself, which is stored
in computer after programming once. It is called with required data when
required again in a program.
Example
01 (Subroutine) (All dimensions are in mm)
%1001;
N2 G17 G71 G94 G90 G54;
N4 T1 L90;
N6 G00 D5 Z5 M3 S500 X9 Y16;
N8 G01 Z0 F500;
N10 L100 P1; (Call the subroutine)
N12 G00 X34 Y16;
N14 G01 Z0 F500;
N16 L100 P1; (Call the subroutine)
N18 G00 X9 Y41;
N20 G01 Z0 F500;
N22 L100 P1; (Call the subroutine)
N24 G00 X34 Y41;
N26 G01 Z0 F500;
N28 L100 P1; (Call the subroutine)
N30 G00 Z100;
N32 M02
Subroutine Program is below :
L100;
N2 G01 G91 Z-1.5 F100 M7;
N4 X7;
N6 Y-7;
N8 X-7;
N10 Y7;
N12 G00 G90 Z5 M9;
N14 M17;
This has been called as a subroutine in the main program as above.
APT (Automatically Programmed Tool)
The various tasks in computer-assisted part programming are divided
between;
The human part programmer
The computer.

Two main tasks of the programmer:


1- Define the part geometry
2- Specify the tool path and Operation Sequence
Define the part geometry
Underlying assumption: no matter how complex the part geometry, it is composed
of basic geometric elements and mathematically defined surfaces
Geometry elements are sometimes defined only for use in specifying tool path
Examples of part geometry definitions:
P4 = POINT/35, 90,0
L1 = LINE/P1, P2
C1 = CIRCLE/CENTER, P8, RADIUS, 30.0

Specify the tool path and Operation Sequence


Tool path consists of a sequence of points or connected line and arc segments,
using previously defined geometry elements
Point-to-Point command:
GOTO/P0
Continuous path command:
GOLFT/L2, TANTO, C1
Cutter Offset:

Cutter path must be offset from actual part outline by a distance equal to the
cutter radius
There are four basic types of statements in the APT language:
1. Geometry statements:

The points, lines, and surfaces must be defined in the program prior to
specifying the motion statements. The general form of an APT geometry
statement is the following

SYMBOL = GEOMETRY TYPE/descriptive data


2. Motion Commands:
All APT motion statements follow a common format, just as geometry
statements have their own format. The general form of an APT motion
command is
At the beginning of the sequence of motion statements, the tool must be given a starting
point. This is likely to be the target point, the location where the operator has positioned
the tool at the start of the job. The part programmer keys into this starting position with
the following statement:

FROM/PTARG

FROM/-20.0, -20.0, 0
Point-to-point motions:
Contouring motions
These are more complicated than PTP commands are because the tool’s position
must be continuously controlled throughout the move.
PARTNO SAMPLE PART DRILLING OPERATION
MACHIN/DRILL,01
CLPRNT
UNITS/MM
REMARK Part geometry, Points are defined 10 mm above part surface.
PTARG = POINT/0, -50.0, 10.0
P5 = POINT/70.0, 30.0, 10.0
P6 = POINT/120.0, 30.0, 10.0
P7 = POINT/70.0, 60.0, 10.0
REMARK Drill bit motion statements.
FROM/PTARG
RAPID
GOTO/P5
SPINDL/1000, CLW
FEEDRAT/0.05, IPR
GODLTA/0, 0, -25.0
GODLTA/0, 0, 25.0
RAPID
GOTO/P6
SPINDL/1000, CLW
FEEDRAT/0.05, IPR
GODLTA/0, 0, -25.0
GODLTA/0, 0, 25.0
RAPID
GOTO/P7
SPINDL/1000, CLW
FEEDRAT/0.05, IPR
GODLTA/0, 0, -25.0
GODLTA/0, 0, 25.0
RAPID
GOTO/PTARG
SPINDL/OFF
FINI

You might also like