0% found this document useful (0 votes)
24 views20 pages

1-New Introduction 1 (I ST Half)

This document provides information about computer numerical control (CNC) machines and programming. It discusses the Cartesian coordinate system used to precisely locate points in CNC. It describes the axes of lathes and milling machines and covers incremental and absolute programming systems. The document distinguishes between point-to-point and continuous path positioning in CNC programming.

Uploaded by

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

1-New Introduction 1 (I ST Half)

This document provides information about computer numerical control (CNC) machines and programming. It discusses the Cartesian coordinate system used to precisely locate points in CNC. It describes the axes of lathes and milling machines and covers incremental and absolute programming systems. The document distinguishes between point-to-point and continuous path positioning in CNC programming.

Uploaded by

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

KONGHU VELALAR POLYTECHNIC

COLLEGE, SEENAPURAM.
DEPARTMENT OF MECHANICAL ENGINEERING

4020561 – COMPUTER INTEGRATED MANUFACTURING


PRACTICAL

LAB MANUAL

Name of the Student : ……………………………………..

Register Number : ……………………………………..

Year / Semester : III / V

Department : …………………………………......

Compiled By: Approved By:


S.KRISHNA KUMAR B.E., P.GOKULAKRISHNAN M.Tech
(Lecturer/KVPC) HOD/MECHANICAL
Introduction to cnc machine
The term numerical control is a widely accepted and commonly used term
in the machine tool industry. Numerical control (NC) enables an operator to
communicate with machine tools through a series of numbers and symbols.
NC which quickly became Computer Numerical Control (CNC) has
brought tremendous changes to the metalworking industry. New machine tools in
CNC have enabled industry to consistently produce parts to accuracies
undreamed of only a few years ago.
The same part can be reproduced to the same degree of accuracy any
number of times if the CNC program has been properly prepared and the
computer properly programmed. The operating commands which control the
machine tool are executed automatically with amazing speed, accuracy,
efficiency, and repeatability.
The ever-increasing use of CNC in industry has created a need for
personnel who are knowledgeable about and capable of preparing the programs
which guide the machine tools to produce parts to the required shape and
accuracy. With this in mind, the authors have prepared this textbook to take the
mystery out of CNC – to put it into a logical sequence and express it in simple
language that everyone can understand. The preparation of a program is explained
in a logical step-by-step procedure, with practical examples to guide the student.
Cartesian coordinate system
Almost everything that can be produced on a conventional machine tool
can be produced on a computer numerical control machine tool, with its many
advantages. The machine tool movements used in producing a product are of two
basic types: point-to-point (straight-line movements) and continuous path
(contouring movements).
The Cartesian, or rectangular, coordinate system was devised by the French
mathematician and philosopher Rene’ Descartes. With this system, any specific
point can be described in mathematical terms from any other point along three
perpendicular axes. This concept fits machine tools perfectly since their
construction is generally based on three axes of motion (X, Y, Z) plus an axis of
rotation. On a plain vertical milling machine, the X axis is the horizontal
movement (right or left) of the table, the Y axis is the table cross movement
(toward or away from the column), and the Z axis is the vertical movement of the
knee or the spindle. CNC systems rely heavily on the use of rectangular
coordinates because the programmer can locate every point on a job precisely.
When points are located on a work piece, two straight intersecting
lines, one vertical and one horizontal, are used. These lines must be at right
angles to each other, and the point where they cross is called the origin, or zero
point (Fig. 1)
Fig. 1 Intersecting lines form right angles and Fig. 2 The three-dimensional coordinate planes (axes)
establish the zero point used in CNC.

The three-dimensional coordinate planes are shown in Fig. 2. The X and Y planes
(axes) are horizontal and represent horizontal machine table motions. The Z plane
or axis represents the vertical tool motion. The plus (+) and minus (-) signs
indicate the direction from the zero point (origin) along the axis of movement.
The four quadrants formed when the XY axes cross are numbered in a
counterclockwise direction (Fig. 3). All positions located in quadrant 1 would be
positive X (X+) and positive Y(Y+). In the second quadrant, all positions would
be negative X (X-) and positive Y (Y+). In the third quadrant, all locations would
be negative X (X-) and negative Y (Y-). In the fourth quadrant, all locations
would be positive X (X+) and negative Y (Y-).

Fig. 3 The quadrants formed when the X and Y axes crossing are used to locate
Points accurately from the XY zero, or origin, point.
In Fig. 3 , point A would be 2 units to the right of the Y axis and 2 units
above the X axis. Assume that each unit equals 1.000. The location of point A
would be X + 2.000 and Y + 2.000. For point B, the location would be X + 1.000
and Y - 2.000. In CNC programming it is not necessary to indicate plus (+) values
since these are assumed. However, the minus (-) values must be indicated. For
example, the locations of both A and B would be indicated as follows:

A X 2.000 Y2.000

B X1.000 Y-2.000

Machines Using CNC


Early machine tools were designed so that the operator was standing in
front of the machine while operating the controls. This design is no longer
necessary, since the operator no longer controls the machine tool movements in
CNC. On conventional machine tools, only about 20 percent of the time was
spent removing material. With the addition of electronic controls, actual time
spent removing metal has increased to 80 percent and even higher. It has also
reduced the amount of time required to bring the cutting tool into each machining
position.

Machine Types

Turning Machine

Fig. 4. The main axes of a lathe or turning center.


The Z axis controls the table movement left or right and it is spindle axis.
The X axis is perpendicular to Z-axis.

Milling Machine
The milling machine has always been one of the most versatile machine
tools used in industry (Fig. 5). Operations such as milling, contouring, gear
cutting, drilling, boring, and reaming are only a few of the many operations which
can be performed on a milling machine. The milling machine can be programmed
on three axes:
• The X axis controls the table movement left or right.
• The Y axis controls the table movement toward or away from the column.
• The Z axis controls the vertical (up or down) movement of the knee or
spindle.

Z AXIS

X AXIS
Y AXIS

Fig. 5 The main axes of a vertical machining center.

Programming Systems
CNC uses two types of programming modes, the incremental system and
the absolute system,. Both systems have applications in CNC programming, and
no system is either right or wrong all the time. Most controls on machine tools
today are capable of handling either incremental or absolute programming.

Positioning of Reference Point Systems


1) Incremental Programming
2) Absolute programming
Incremental Programming
Incremental program locations are always given as the distance and
direction from the immediately preceding point (Fig. 6). Command codes which
tell the machine to move the table, spindle and knee are explained here using a
vertical milling machine as an example:

Fig. 6 A workpiece dimensioned in the incremental system mode.

A “X plus” (X+) command will cause the cutting tool to be located to the right of
the last point.
A “X minus” (X-) command will cause the cutting tool to be located to the left of
the last point.
A “Y plus” (Y+) command will cause the cutting tool to be located toward the
column.
A “Y minus” (Y-) will cause the cutting tool to be located away from the column.
A “Z plus” (Z+) command will cause the cutting tool or spindle to move up or
away from the workpiece.
A “Z minus” (Z-) moves the cutting tool down or into the workpiece.

In incremental programming, the G91 command indicates to the computer


and MCU (Machine Control Unit) that programming is in the incremental mode.
Absolute programming
Absolute program locations are always given from a single fixed zero or
origin point (Fig. 7). The zero or origin point may be a position on the machine
table, such as the corner of the worktable or at any specific point on the
workpiece. In absolute dimensioning and programming, each point or location on
the workpiece is given as a certain distance from the zero or reference point.

Fig. 7 A workpiece dimensioned in the absolute system mode. Note: All dimensions are given
from a known point of reference.
A “X plus” (X+) command will cause the cutting tool to be located to the right of
the zero or origin point.
A “X minus” (X-) command will cause the cutting tool to be located to the left of
the zero or origin point.
A “Y plus” (Y+) command will cause the cutting tool to be located toward the
column.
A “Y minus” (Y-) command will cause the cutting tool to be located away from
the column.
In absolute programming, the G90 command indicates to the computer and
MCU that the programming is in the absolute mode.

Types of cnc positioning system


Point-to-Point or Continuous Path
CNC programming falls into two distinct categories. The difference
between two categories is very distinct. Now, however, most control units are
able to handle both point-to-point and continuous path machining. Knowledge of
both programming methods is necessary to understand the each applications in
CNC.
Point-to-Point Positioning
Point-to-point positioning is used when it is necessary to accurately locate
the spindle, or the workpiece mounted on the machine table, at one or more
specific locations to perform such operations as drilling, reaming, boring, tapping,
and punching (Fig.9). Point-to-point positioning is the process of positioning
from one coordinate (XY) position or location to another, performing the
machining operation, and continuing this pattern until all the operations have
been completed at all programmed locations.

Fig. 9 The path followed by point-to-point positioning to reach various programmed points
(machining locations) on the XY axis.

In Fig. 9 point 1 to point 2 is a straight line, and the machine moves only
along the X axis; but points 2 and 3 require that motion along both the X and Y
axes takes place. As the distance in the X direction is greater than in the Y
direction, Y will reach its position first, leaving X to travel in a straight line for
the remaining distance. A similar motion takes place between points 3 and 4.
Continuous Path (Contouring)
Contouring or continuous path machining, involves work such as that
produced on a lathe or milling machine, where the cutting tool is in contact with
the work piece as it travels from one programmed point to the next. Continuous
path positioning is the ability to control motions on two or more machine axes
simultaneously to keep a constant cutter - work piece relationship. The
programmed information in the CNC program must accurately position the
cutting tool from one point to the next and follow a predefined accurate path at a
programmed feed rate in order to produce the form or contour required (Fig. 10)

Fig. 10 Types of contour machining (A) Simple contour;


(B) complex contour

Interpolation
The method by which contouring machine tools move from one
programmed point to the next is called interpolation. The ability to merge
individual axis points into a predefined tool path is built into most of today’s
MCU’s. There are five methods of interpolation: linear, circular, helical,
parabolic, and cubic. All contouring controls provide linear interpolation, and
most controls are capable of both linear and circular interpolation. Helical,
parabolic, and cubic interpolation are used by industries that manufacture parts
which have complex shapes, such as aerospace parts and dies for car bodies.
Linear Interpolation
Linear Interpolation consists of any programmed points linked together by
straight lines, whether the points are close together or far apart .Curves can be
produced with linear interpolation by breaking them into short, straight-line
segments. This method has limitations, because a very large number of points
would have to be programmed to describe the curve in order to produce a contour
shape. A contour programmed in linear interpolation requires the coordinate
positions (XY positions in two-axis work) for the start and finish of each line
segment. Therefore, the end point of one line or segment becomes the start point
for the next segment, and so on, throughout the entire program.
Circular Interpolation
The development of MCU’s capable of circular interpolation has greatly
simplified the process of programming arcs and circles. To program an arc (Fig.
12), the MCU requires only the coordinate positions (the XY axes) of the circle
center, the radius of the circle, the start point and end point of the arc being cut,
and the direction in which the arc is to be cut (clockwise or counterclockwise)
See Fig.12. The information required may vary with different MCU’s.

Fig. 12 For two-dimensional circular interpolation , the MCU must be supplied with the XY axis,
radius, start point, end point, and direction of cut.

Programming Format
Word address is the most common programming format used for CNC
programming systems. This format contains a large number of different codes
(preparatory and miscellaneous) that transfers program information from the part
print to machine servos, relays, micro-switches, etc., to manufacture a part. These
codes, which conform to EIA (Electronic Industries Association) standards, are in
a logical sequence called a block of information. Each block should contain
enough information to perform one machining operation.
Word Address Format
Every program for any part to be machined, must be put in a format that the
machine control unit can understand. The format used on any CNC machine is
built in by the machine tool builder and is based on the type of control unit on the
machine. A variable-block format which uses words (letters) is most commonly
used. Each instruction word consists of an address character, such as X, Y, Z, G,
M or S. Numerical data follows this address character to identify a specific
function such as the distance, feed rate, or speed value.
The address code G90 in a program, tells the control that all measurements
are in the absolute mode. The code G91, tells the control that measurements are in
the incremental mode.

Codes
The most common codes used when programming CNC 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
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 .The G-codes are
grouped into categories such as Group 01, containing codes G00, G01, G02, G03.
which cause some movement of the machine table or head. Group 03 includes
either absolute or incremental programming, while Group 09 deals with canned
cycles.
A G00 code rapidly positions the cutting tool while it is above the work
piece from one point to another point on a job. During the rapid traverse
movement, either the X or Y axis can be moved individually or both axes can be
moved at the same time. Although the rate of rapid travel varies from machine to
machine, it ranges between 200 and 800 in./min (5 and 20 m/min).
BASIC G - CODES

The G01, G02, and G03 codes move the axes at a controlled feed rate.

• G01 is used for straight-line movement (linear interpolation).


• G02 (clockwise) and
 G03 (counterclockwise) are used for arcs and circles (circular
interpolation).

Commonly used G-codes in CNC programming.


G CODES FOR TURNING

S. No G -CODES FUNCTIONS
1. G00 Positioning (Rapid Traverse)
2. G01 Linear Interpolation (Feed)
3. G02 Circular Interpolation (CW)
4. G03 Circular Interpolation (CCW)
5. G04 Dwell, Exact Stop
6. G20 Inch Data Input
7. G21 Metric Data Input
8. G28 Reference Point return(Home)
9. G32 Thread cutting
10. G40 Cutter compensation cancel
11. G41 Cutter compensation left
12. G42 Cutter compensation right
13. G50 Work coordinate change / maximum spindle speed setting
14. G70 Finishing cycle
15. G71 Stock removal in turning
16. G72 Stock removal in facing
17. G73 Pattern Repeating
18. G74 Peck drilling in Z- axis
19. G75 Grooving in X - axis
20. G76 Multiple thread cutting cycle
21. G90 Cutting cycle (turning)
22. G92 Thread cutting cycle
23. G94 Cutting cycle (Facing)
24. G96 Constant surface speed control
25. G97 Constant surface speed control cancel
26. G98 Feed per minute
27. G99 Feed per revolution
G-CODES FOR MILLING

S. No G -CODES FUNCTIONS
1 G00 Positioning (Rapid Traverse)
2 G01 Linear Interpolation (Feed)
3 G02 Circular Interpolation (CW)
4 G03 Circular Interpolation (CCW)
5 G04 Dwell, Exact Stop
6 G17 XY Plane selection
7 G18 ZX Plane selection
8 G19 YZ Plane selection
9 G20 Inch Data Input
10 G21 Metric Data Input
11 G28 Reference Point return (Home)
12 G40 Cutter compensation cancel
13 G41 Cutter compensation left
14 G42 Cutter compensation right
15 G43 Tool length Compensation + direction
16 G44 Tool length Compensation -direction
17 G49 Tool length Compensation cancel
18 G73 High speed peck drilling cycle
19 G74 L.H Tapping cycle
20 G76 Fine boring
21 G80 Canned cycle cancel
22 G81 Continuous drilling cycle, spot boring
23 G82 Continuous drilling cycle, spot boring with dwell
24 G83 Peck drilling cycle
25 G84 R.H Tapping cycle
26 G90 Absolute Zero
27 G91 Incremental Command
28 G94 Feed per Minute
29 G170 & G171 Circular Pocketing
30 G172 & G173 Rectangular Pocketing

M-CODES
M or Miscellaneous codes are used to either turn ON or OFF different
functions which control certain machine tool operations, Fig. 15.M-codes are not
grouped into categories, although several codes may control the same type of
operations such as M03, M04, and M05 which control the machine tool spindle.
 M03 turns the spindle on clockwise
 M04 turns the spindle on counterclockwise and M05 turns the spindle off
SOME M-CODES FOR TURNING and MILLING

S. No M-CODES FUNCTIONS ON MILLING FUNCTIONS ON TURNING


1 M00 Program Stop Program Stop
2 M01 Optional Stop Optional Stop
3 M02 Program end Program end
4 M03 Spindle Forward (CW) Spindle Forward (CW)
5 M04 Spindle Reverse (CCW) Spindle Forward (CCW)
6 M05 Spindle Stop Spindle Stop
7 M06 Tool Change Tool Change
8 M08 Coolant ON Coolant ON
9 M09 Coolant OFF Coolant OFF
10 M10 Vice Open Chuck Open
11 M11 Vice Close Chuck Close
12 M30 Program Reset & rewind Program Reset & rewind
13 M38 Door Open Door Open
14 M39 Door Close Door Close
15 M70 X-Mirror On -
16 M71 Y-Mirror On -
17 M80 X-Mirror Off -
18 M81 Y-Mirror Off -
19 M98 Sub Program Call Sub Program Call
20 M99 Sub Program Exit Sub Program Exit
Block of Information
CNC information is generally programmed in blocks of five 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, therefore the control unit will not be
activated.
Using the example shown in Fig. 17 , the five words are as follows:
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.
Fig. 17 A complete block of information consists of five words.

Programming for Positioning


Before starting to program a job, it is important to become familiar with the
part to be produced. From the engineering drawings, the programmer should be
capable of planning the machining sequences required to produce the part. Visual
concepts must be put into a written manuscript as the first step in developing a
part program, Fig.18. It is the part program that will be sent to the machine
control unit by the computer, tape, diskette, or other input media. The
programmer must first establish a reference point for aligning the work piece and
the machine tool for programming purposes. The manuscript must include this
along with the types of cutting tools and work-holding devices required, and
where they are to be located.
Dimensioning Guidelines
The system of rectangular coordinates is very important to the successful
operation of CNC machines. Certain guidelines should be observed when
dimensioning parts for CNC machining. The following guidelines will insure that
the dimensioning language means exactly the same thing to the design engineer,
the technician, the programmer, and the machine operator.
1. Define part surfaces from three perpendicular reference planes.
2. Establish reference planes along part surfaces which are parallel to the machine
axes.
3. Dimension from a specific point on the part surface.
4. Dimension the part clearly, so that its shape can be understood without making
mathematical calculations or guesses.
5. Define the part, so that a computer numerical control cutter path can be easily
programmed.
Machine Zero Point
The machine zero point can be set by three methods—by the operator,
manually by a programmed absolute zero shift, or by work coordinates, to suit the
holding fixture or the part to be machined.
MANUAL SETTING - The operator can use the MCU controls to locate the
spindle over the desired part zero and then set the X and Y coordinate registers on
the console to zero.

Stored zero shifts (G54...G59)


Programmed zero shift (G92)

R = Reference point (maximum travel of machine)

M = Machine zero point (X0,Y0,Z0) of machine coordinate system.

W = Part zero point workpiece coordinate system.

Fig.19 The relationship between the part zero and the machine system of coordinates.

ABSOLUTE ZERO SHIFT


The absolute zero shift can change the position of the coordinate system by
a command in the CNC program. The programmer first sends the machine
spindle to home zero position by a G28 command in the program. Then another
command (G92 for absolute zero shift) tells the MCU how far from the home
zero location, the coordinate system origin is to be positioned, Fig. 19.
The sample commands may be as follows:
N1 G28 X0 Y0 Z0 (sends spindle to home zero position)
N2 G92 X4.0 Y5.0 Z6.0 (the position the machine will reference as part zero).
Work Settings and Offsets
All CNC machine tools require some form of work setting, tool setting, and
offsets (compensation) to place the cutter and work in the proper relationship.
Compensation allows the programmer to make adjustments for unexpected
tooling and setup conditions.
Work Coordinates
In absolute positioning, work coordinates are generally set on one edge or
corner of a part and all programming is generally taken from this position. In Fig.
20, the part zero is used for all positioning for hole locations 1, 2, and 3.

Fig. 20 In absolute programming, all dimensions must be taken from the XY zero at the top
left-hand corner of the part.

Fig. 21 In incremental programming, all dimensions are taken from the previous point.

In incremental positioning, the work coordinates change because each location is


the zero point for the move to the next location, Fig. 21.On some parts, it may be
desirable to change from absolute to incremental, or vice versa, at certain points
in the job. Inserting the G90 (absolute) or the G91 (incremental) command into
the program at the point where the change is to be made can do this.
R Plane or Gage Height
The word-address letter R refers to a partial retraction point in the Z axis to
which the end of the cutter retracts above the work surface to allow safe table
movement in the X Y axes. It is often called the rapid-traverse distance, gage
height, retract or work plane.
Cutter Diameter Compensation
Cutter diameter compensation (CDC) changes a milling cutter’s
programmed centerline path to compensate for small differences in cutter
diameter. On most MCUs, it is effective for most cuts made using either linear or
circular interpolation in the X-Y axis, but does not affect the programmed Z-axis
moves. Usually compensation is in increments of .0001 in. up to +1.0000 in., and
usually most controls have as many CDCs available as there are tool pockets in
the tool storage matrix. The advantage of the CDC feature is given below,
1. Allows the use of cutters that have been sharpened to a smaller diameter.
2. Permits the use of a larger or smaller tool already in the machine’s storage
matrix.
3. Allows backing the tool away when roughing cuts are required due to
excessive material present.
4. Permits compensation for unexpected tool or part deflection, if the deflection is
constant throughout the programmed path.
If a 1.000 in. diameter end mill is used to machine the edges of a work
piece, the programmer would have to keep a 0.500 in. offset from the work
surface in order to cut the edges accurately, Fig. 22.The 0.500 offset represents
the distance from the centerline of the cutter or machine spindle to the edge of the
part. Whenever a part is being machined, the programmer must calculate an offset
path, which is usually half the cutter diameter.

Fig. 22 Cutter-diameter compensation must be used when machining with various size
cutters.
SYLLABUS
INDEX

Staff
S.No Date Experiment Marks
signature

10

11

12

You might also like