0% found this document useful (0 votes)
11 views

Ch_8 Part Programming

Ch_8 Part Programming

Uploaded by

Do Thi My Le
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Ch_8 Part Programming

Ch_8 Part Programming

Uploaded by

Do Thi My Le
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

PART PROGRAMMING

CHAPTER 8
1. TYPES OF PART PROGRAMMING
• 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.
• All data is fed into the numerical control system using a
standardized format
• Programming is where all the machining data are compiled
and where the data are translated into a language which can
be understood by the control system of the machine tool .
• 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 work piece.
(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
1. Manual Part Programming
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.
2. 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, ROMANCE, 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
• The part programmer can create the geometrical
model in the CAM package or directly extract
the geometrical model from the CAD/CAM
database. Built in tool motion commands can
assist the part programmer to calculate the tool
paths automatically.
• The programmer can verify the tool paths through
the graphic display using the animation function
of the CAM system. It greatly enhances the speed
and accuracy in tool path generation
2. FUNDAMENTAL ELEMENTS FOR
DEVELOPING MANUAL PART PROGRAMME

• Type of Dimensioning System : whether an


absolute or incremental dimensional system
• Axis Designation : determines how many axes
are availed on machine tool . Whether machine
tool has a continuous path and point-to-point
control system .
• NC Words : 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. An end of
block symbol is used to separate the blocks
- 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.

Tape Programming 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
N20 G00 X1.200 Y.100 F325 S1000 T03 M09 <EOB>
or
N20 G00 X1.200 Y.100 F325 S1000 T03 M09;
• Standard G and M Codes: The most
common codes used when programming NC
machines tools are G-codes (preparatory
functions), and M codes (miscellaneous
functions). Other codes such as F, S, D, and T
are used for machine functions such as feed,
speed, cutter diameter offset, tool number, etc.
G-codes are sometimes called cycle codes
because they refer to some action occurring on
the X, Y, and/or Z-axis of a machine tool
G-Codes (Preparatory Functions)
Code Function
• G00 Rapid positioning
• G01 Linear interpolation
• G02 Circular interpolation clockwise (CW)
• G03 Circular interpolation counterclockwise
(CCW)
• G20 Inch input (in.)
• G21 Metric input (mm)
• G24 Radius programming
• G28 Return to reference point
• G29 Return from reference point
• G32 Thread cutting
• G40 Cutter compensation cancel
• G41 Cutter compensation left
• G42 Cutter compensation right
• G43 Tool length compensation positive (+)
direction
• G44 Tool length compensation minus (-) direction
• G49 Tool length compensation cancels
• G 53 Zero offset or M/c reference
• G54 Settable zero offset
• G84 canned turn cycle
• G90 Absolute programming
• G91 Incremental programming
Note : On some machines and controls, some may be
differ
M-Codes (Miscellaneous Functions)
• M00 Program stop
• M02 End of program
• M03 Spindle start (forward CW)
• M04 Spindle start (reverse CCW)
• M05 Spindle stop
• M06 Tool change
• M08 Coolant on
• M09 Coolant off
• M10 Chuck - clamping
• M11 Chuck - unclamping
• M12 Tailstock spindle out
• M13 Tailstock spindle in
• M17 Tool post rotation normal
• M18 Tool post rotation reverse
• M30 End of tape and rewind or main program end
• M98 Transfer to subprogram
• M99 End of subprogram
3. MILLING PROGRAMMING
The Coordinate System: Part of NC programs is the description
of cutter paths and target points. To ensure correct execution of
such commands, the applicable geometric dimensions must be
precisely defined, so as to affect the corresponding tool
movement on the machine tool.
Selection of Planes: Circular cutter movement in each of the
three machining planes
Steps for CNC Programming and Machining
Reference points of a CNC Milling Machine
• The machine zero point (also called the machine
datum) constitutes the origin of the machine reference
system. As a rule, it has been defined by the
manufacturer and it cannot be altered
• The reference point serves to calibrate the position
measuring systems
• All tool movements effected by the control system
(according to the specified coordinates) will refer to the
tool reference point, which is situated on the front face
of the tool mounting
• The workpart zero can be determined at will, always
relating to the machine zero. It is recommended,
though, to define the workpart zero as identical with the
origin (zero point of the coordinate system) of the
workpart design drawing
• The compensation value in Z is determined by the
distance between the the cutting point and the tool
reference point.
• Cutter radius compensation is necessary to ensure that
the programmed contour will be identical with the
executed contour
• When the cutter radius compensation (CRC) is active,
the control system will establish an appropriate tool
center path (equidistant), accounting for the cutter
radius
• Spindle Function: The spindle speed is commanded
under an S address and is always in revolution per
minute. It can be calculated by the following formula
:

Feed Function : The feed is programmed under an F


address except for rapid traverse. The unit may be in
mm per minute or in mm per revolution.
• Rapid Positioning G00: This is to command the
cutter to move from the existing point to the target
point at the fastest speed of the machine
Linear Interpolation in Slow Feed Motion G01
• The tool will move at the programmed feedrate to the
target position as programmed by the X- Y- and Z-
coordinates. These coordinates may either be
programmed in the absolute system (G90) or in the
incremental system (G91).
G01 [X...] [Y...] [Z...] [F...] [S...] [T...] [M...]
• X : X-Coordinate of the target point
• Y : Y-Coordinate of the target point
• Z : Z-Coordinate of the target point
• F : Feed rate (mm/min)
• S : Spindle Speed (RPM)
• T Tool Change
• M Additional Function
• Circular Interpolation G02/G03: 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.
This parameter is defined as the vector from the
starting point to the center of the arc.
Clockwise Circular Interpolation G02
• The tool will move at the programmed feedrate
clockwise on a circular arc to the target position
as defined by the coordinates in X and Y. These
coordinates may either be programmed in the
absolute system (G90) or in the incremental
system (G91).
• If a Z-value different from the Z-coordinate of the
starting point is programmed, the tool will move
on a path called a helical interpolation: a linear
feed motion in the Z-direction is superimposed
on the tool movement along the arc.
G02 [X...]1) [Y...]1) [Z...]1) [I...]2) [J...]2) [F...] [S...] [T...]
[M...]
• I Circle Centre Incremental (distance between the
starting position and the circle centre in the X-direction).
• J Circle Centre Incremental (distance between the
starting position and the circle centre in the Y-direction).
• When I or J (as defined above) are not programmed, the
respective centre coordinate is set to zero.
Counter-Clockwise Circular Interpolation G03
• The tool will move at the programmed feedrate
clockwise on a circular arc to the target point as defined
by the coordinates in X and Y.
Cutter compensation (G40/G41/G42)
4. PART PROGRAM FOR LATHE
OPERATION
• When the cutting tool moves toward and backward the machine
spindle, this is called movement along Z axis. Positive Z direction is
when the tool moves away from the workpiece in Z axis.
• When the cutting tool moves in cross direction to the longitudinal
axis of the workpiece, this is called movement along X axis.
Positive X direction is when the tool moves away from the work
part in X axis
Position and graphic symbols denoting
the reference points of a CNC lathe
The coordinate system is
dependent on the tool position

The origin point on the workpiece


is called Workpiece zero point
(W).
Tool Geometry

• Tool compensation
The compensation vector determines the
position of the tool nose
Sequence of Words within an NC Block
• Each NC program
comprises a number
of so-called blocks,
which contain the
commands to be
executed.
• These blocks are
consecutively
numbered; each block
number consisting of
the letter "N" plus a
(e.g. three-digit)
numeral. Block
numbers appear at
the beginning of each
program line.
Modal Commands and Non-modal Commands
• Modal commands are self-retentive, i.e. they will take effect in
consecutive NC blocks, until they are deleted or overwritten
by a command at the same address. Non-modal commands
instead are "block-oriented", they will be active only in the
block in which they are programmed.
Clockwise Circular Interpolation G02
• G02 [X...] [Z...] [I...] [K...] [F...] [S...] [T...] [M...]
• When absolute dimensions are programmed
(G91), X relates to the workpiece diameter. When
incremental dimensions are programmed (G91),
X relates to the workpiece radius.
• Z Z-Coordinate of the target point
• I Circle Centre Incremental (distance between
the starting position and the circle centre in the
direction X, relative to the radius).
• K Circle Centre Incremental (distance between
the starting position and the circle centre in the
direction Z)
Circular Interpolation Counter-
Clockwise G03
• The CNC lathe operation such as simple facing,
turning, taper turning, thread, boring, parting off etc.
The X-axis and Z-axis are taken as the direction of
transverse motion of the tool post and the axis of the
spindle respectively. To prepare part programs using
G-codes and M-codes.
• % 1000; (Main program)
• N01 G54 G90 G71 G94 M03 S800; (Parameters Setting)
• N05 G01 X-12.5 Z0 F2; (Facing the job)
• N10 G00 Z1; (Retrieval of tool)
• N15 G00 X00; (Tool clearance)
• N20 G01 Z-100; (Starting cut)
• N25 G00 X1 Z1; (Clearance position)
• N30 G00 X-2; (Position of cut)
• N35 G01 Z-60; (Cutting length)
• N40 G00 X-1 Z1; (Retrieval of tool)
• N45 G00 X-3; (Position of cut)
• N50 G01 Z-60; (Cutting length)
• N55 G00 X-2 Z1; (Retrieval of tool)
• N60 G00 X-4; (Position of cut)
• N65 G01 Z-60; (Cutting length)
• N70 G00 X-3 Z1; (Retrieval of tool)
• N75 G00 X-4.5; (Position of cut)
• N80 G01 Z-60; (Cutting length)
• N85 G00 X5 Z5; (Final position of tool)
• N90 M02; (End of program)
• % 2000; (Main programm)
• N01 G54 G91 G71 G94 M03 S800; (Parameters Setting)
• N05 G01 X-15 Z0 F2; (Facing the job)
• N10 G00 Z1; (Tool clearance)
• N15 G00 X10; (Tool clearance from the centre)
• N20 G01 Z-36; (Turning operation)
• N25 G01 X5 –Z30; (Taper turning operation)
• N30 G00 X1 Z66; (Final position of tool)
• N35 M02; (End of programm
• % 2000; (Main program)
• N01 G91 G71 G94 M03 S800; (Parameters Setting)
• N05 G01 X-5 Z0 F1; (Facing the job)
• N10 G02 X5 Z-5 I0 K5; (Circular Interpolation)
• N15 G00 X6 Z6; (Final position of tool)
• N20 M02; (End of program).
PART PROGRAM FOR MACHINING
CENTRES

• % 100; (Main program)


• N5 G17 G21 G90 G94 G54; (Parameters Setting)
• N10 T2 L90; (Home position) (Dia. 10mm)
• N15 G00 D2 Z5 M3 S700 X10 Y25; (Position of tool)
• N20 G01 Z-1.5 F60; (Position of cut)
• N25 G01 X40 F100 M8; (Cutting slat)
• N30 G00 Z100 M9; (Final position of tool)
• N35 M30; (Main program end)
• %101; (Main program)
• N2 G17 G21 G90 G94 G54; (Parameters Setting)
• N4 T1 L90; (Home position) (Dia. 10mm)
• N6 G00 Z5 D5 M3 S500 X20 Y90; (Position of tool)
• N8 G01 Z-2 F50; (Position of cut)
• N10 G02 X60 Y50 I0 J-40; (Circular interpolation clockwise-CW)
• N12 G03 X100 Y50 I20 J0; (Circular interpolation clockwise-CCW)
• N14 G00 Z100; (Final position of tool)
• N16 M02; (End of program)
Exercises
REFERENCES
• Mathematisch Technische Software - Entwicklung GmbH
• Steve Krar Arthur Gill, COMPUTERNUMERICAL CONTROL PROGRAMMINGBASICS

You might also like