0% found this document useful (0 votes)
3 views68 pages

CNC Turning Programming

The document provides an overview of CNC part programming, highlighting its advantages over conventional methods, such as improved accuracy and efficiency. It details the structure of CNC programs, including block structure, axis identification, and various G and M codes for different machining functions. Additionally, it discusses programming techniques, including absolute and incremental data input systems, and provides examples of stock removal cycles and CNC programming for specific components.

Uploaded by

nisargbharada073
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)
3 views68 pages

CNC Turning Programming

The document provides an overview of CNC part programming, highlighting its advantages over conventional methods, such as improved accuracy and efficiency. It details the structure of CNC programs, including block structure, axis identification, and various G and M codes for different machining functions. Additionally, it discusses programming techniques, including absolute and incremental data input systems, and provides examples of stock removal cycles and CNC programming for specific components.

Uploaded by

nisargbharada073
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/ 68

PART PROGRAMMING OF CNC

TURING MACHINE

Prof. Chirag p patel


Associate Professor
Mechanical Engg. Dept.,
U v patel college of engineering
IMPORTANCE OF CNC
• CNC has the ability to manufacture products of
consistent quality more economically than
conventional methods.

• CNC machines are much faster, more accurate and


more versatile where complex shapes are to be
machined.

• When we produce a component manually we get an


accuracy up to 0.1% accuracy, while producing the
same component on CNC we get an accuracy of
0.01%
COMPARISONS OF CONVENTIONAL, NC/CNC
AND SPM’S
CAPABILITY OF NEW CNC MACHINES

• high spindle speed (> 20,000 rpm)

• high feed rate drive ( > 600 ipm)

• high precision ( < 0.0001" accuracy)


UNIVERSAL SLANT BED TYPE TURNING CENTER
INTRODUCTION TO CNC PART
PROGRAMMING
• Manual part programming
– Absolute Programming
– Incremental Programming

• Computer-assisted part programming


– By using different CAD software like Pro- Manufacturing,
CATIA, Master CAM etc…
FUNDAMENTAL OF CNC PART
PROGRAMMING
HOW TO NAME THE PROGRAM ?
• When creating a program, the program name can be
freely selected if the following conventions are used.

• First two characters must be letters.


• the remaining characters may be letters, digits or
underscore,
• Do not use any separators (space) between two
characters.
• Maximum 16 or more characters are permitted
• depending upon the control unit.
CNC PROGRAM STRUCTURE
• The NC program consists of a sequence of blocks.
Each block constitutes a machining step. Statements
in a block are written in the form of words. The last
block in the order of execution of blocks contains a
special word for the program end
BLOCK STRUCTURE
• A block should contain all data required to execute a
step of machining. Block generally consist of several
words and are always completed with the end-of-
block character "LF". This character is automatically
generated when pressing the line space key or the
input key on writing
BASIC ELEMENTS OF BLOCK STRUCTURE
• The block may contain any or all of the following
• Sequence or block number (N)
• Preparatory functions (G)
– These are the codes which prepare the machine to
perform a particular function like Positioning,
contouring, thread cutting and canned cycling.
• Dimensional information (X, Y, Z , etc)
• Decimal point (.)
• Feed rate (F)
– The rate at which the cutter travels through the
material, is specified in mm/min or mm/rev.
BASIC ELEMENTS OF BLOCK STRUCTURE
• Spindle speed (S)
– This may indicate either the spindle rpm or the constant
cutting speed in m/min.
• Tool number (T)
– For machines having automatic tool changers or turrets, the
T word calls cut a particular tool that has to be used for
cutting.
• Tool offset function (D)
– This word activates the cutter radius arid length
compensations
• Miscellaneous functions (M, H, etc)
• End of block (EOB)
BASIC ELEMENTS OF BLOCK STRUCTURE
• How to Skip the Block:

Blocks of a program, which are not to be executed


with each program run, can be marked by a slash " / "
in front of the block number. If block skip is active
during program execution, all blocks marked with " /"
are skipped. The program is continued with the next
block without marking.
AXIS IDENTIFICATION CNC MACHINE
X -AXIS:
• It should be horizontal.
• It is generally longest axis of movement of work piece or tool.
• It should be perpendicular to Z –axis.
• It is always parallel to surface of the holding devices.

Y -AXIS:
• It should be perpendicular to X and Z

Z -AXIS:
• It is always parallel to the spindle.
• It should be perpendicular to X and Z axis.
AXIS IDENTIFICATION CNC MACHINE
AXIS IDENTIFICATION CNC MACHINE
PREPARATORY FUNCTIONS-G CODE
• G00 -Linear interpolation at rapid traverse.
• G01 - Linear interpolation at given feed rate.
• G02 -Circular interpolation in clockwise direction.
• G03 -Circular interpolation in counter clockwise direction.
• G04 – Dwell
• G17 – XY Plane Setting For Machining
• G18 – XZ Plane Setting For Machining
• G19 – YZ Plane Setting For Machining
• G25 - Lower spindle speed limiting or lower work area limiting.
• G26 -Upper spindle speed limiting or upper work area limiting.
• G28 – Reference Point Approach
• G33 -Thread cutting with constant lead
• G40 -Tool radius compensation OFF
• G41-Tool radius compensation left of the contour.
• G42-Tool radius compensation right of the contour.
• G54 - Select zero offset 1
• G55 - Select zero offset 2
• G56 - Select zero offset 3
• G57 - Select zero offset 4
• G60 - Exact stop
• G64 - Continuous path control mode.
• G70 - Input data system in inch
• G71 - Input data system in metric
• G75 - Fixed point approach.
• G90 - Absolute dimension programming.
• G91- Incremental dimension programming.
• G94 - Feed rate F in mm/min
• G95 - Feed rate F in mm/spindle revolutions.
• G96 - Constant cutting speed ON.
• G97 - Constant cutting speed OFF.
INTERPOLATION
• G00 – Linear Interpolation at rapid Transverse

• G01 – Linear interpolation at given feed rate

• G02 – Circular Interpolation in Clockwise direction

• G03 – Circular Interpolation in Counter clockwise


direction
G00 X10 Y10 Z10 <EOB>
INTERPOLATION
• G00 – Linear Interpolation at rapid Transverse
Example:
G00 X10 Z-30

G00 Lathe G00 Mill


G00 X10 Y10 Z10 <EOB>
G01 X10 Y10 Z10 F0.05 <EOB>

• G01 – Linear interpolation at given feed rate


Example:
G01 X10 Z-30 F0.05

G01 Lathe G01 Mill


G00 X10 Y10 Z10 F0.05 <EOB>
• G02 – Circular Interpolation in Clockwise Direction
– Example:
G02 X10 Z-30 CR=10

G02 Lathe G02 Mill

G02 X10 Y10 Z10 CR=10 F0.05 <EOB>


• G03 – Circular interpolation in Counter Clockwise
Direction
– Example:
G03 X10 Z-30 CR=10

G03 Lathe G03 Mill

G03 X10 Y10 Z10 CR=10 F0.05 <EOB>


CIRCULAR INTERPOLATION
• Centre and end point specification for circle:
CIRCULAR INTERPOLATION
• End point and radius specification for circle:
CIRCULAR INTERPOLATION
• End point and aperture angle specification for circle :
CIRCULAR INTERPOLATION
• Centre point and aperture angle specification for circle :
PREPARATORY FUNCTIONS
G17 , G18, G19 – Plane Setting For Machining

G17 – XY Plane G18 – XZ Plane G19 – YZ Plane


PREPARATORY FUNCTIONS
G28 – Reference Point Approach

G28 Lathe G28 Mill


ABSOLUTE AND INCREMENTAL DATA INPUT
SYSTEM
• G90-Absolute data input

• G91 - Incremental data input

• Z=AC(..) Absolute data input for certain axis (here Z-


axis)

• Z=IC(..) Incremental data input for certain axis (here


Z-axis)
ABSOLUTE AND INCREMENTAL DATA INPUT
SYSTEM
• ABSOLUTE DIMENSIONING SYSTEM
– All the points will be specified from the work piece
zero or machine zero point.
– It is simplest method for part programming.
ABSOLUTE AND INCREMENTAL DATA INPUT
SYSTEM
• INCREMENTAL DIMENSIONING SYSTEM
– The current points are specified from last position
– It is quite difficult to programmed by using this
method.
METRIC AND INCH DIMENSIONING
• G70 - inch dimensions
• G71 - metric dimensions
G70 or G71 interprets all geometrical data specified
directly with reference to the work piece in inches of
metrically, e.g.: X, Y, Z, G01, G01, G02, G03, G33
MISCELLANEOUS FUNCTION ( M-CODES )
• M00 - Unconditional program stop.
• M01 -Conditional program stop.
• M02 -End of program with return to program start.
• M03 -Spindle rotation, in clockwise direction.
• M04 -Spindle rotation, in counter clockwise direction.
• M05 -Spindle stop.
• M06 - Tool change at reference point.
• M16 - Tool change at current location
• M08 - Coolant ON.
• M09 - Coolant OFF.
• M30 - End of program.
PROGRAMMING EXAMPLE ( M-CODES )
• M03 - Spindle rotation, in clockwise direction.
– Example
– M03 S2000
• M04 - Spindle rotation, in counter clockwise direction.
– Example
– M04 S2000
• M06 - Tool change at reference point.
– Example
– M06 T7 D1
• M16 - Tool change at current location
– Example
– M16 T7 D1
MISCELLANEOUS FUNCTION ( M-CODES )
• M03 – Spindle Revolution in Clockwise Direction
• M04 – Spindle Revolution in Counter Clockwise
Direction

M03
MISCELLANEOUS FUNCTION ( M-CODES )
• M06 – Tool Change at Reference Point
• M16 - Tool Change at Current location
MISCELLANEOUS FUNCTION ( M-CODES )
• M08 – Turn on Coolant
• M09 - Turn off Coolant

M08
TOOL OFFSET
• Setting of tool offset is very important task in CNC
machine.
• It is the process to define work zero position.
• In SIMANS 802D machine we can define 8 different
tool offset for one tool.
• We can locate 8 different tool in our turret.
• So totally we can set 64 different tool offset for our
machine.
• Tool offset is denoted by D1, D2, D3……..
COORDINATE SYSTEM
MCS (Machine Coordinate System):
During a programming if we consider Machine zero as a
reference point for programming then that system is
called as a Machine coordinate system.

WCS (Work Coordinate System):


During programming it is very complicated to take all
dimensions from machine zero position so we can define
our own reference point on the work piece for our
convince that System is called as work Coordinate
System
DIFFERENT MODE OF CNC MACHINE
JOG (Manual Mode):
Jog mode is a completely manual mode. We can operate
machine like conventional machine by using switch
board.
MDA (Semi Automatic Mode):
We can write program in this mode and can also run
programme in this mode. When the program is also in
running condition simultaneously we can edit the
program. But we cannot see simulation in this mode.
AUTO (Automatic Mode):
This mode is completely automatic mode. We cannot
create the program in this mode but we can run the
previously prepared program in this mode. Also we see
the simulation in this mode.
MOTION CONTROL
• Automatic, precise, consistent motion control
• Two or more axes it may be (3 ,4 or 5 axis) Linear
and circular interpolation
• CNC is controlled by programme which is previously
feed. Coordinate system
• Program zero point
(STOCK REMOVAL CYCLE)
• When we prepare the part programming by using CAD
software then we don’t bother about no of lines but when
we are going for manual part programming then it is
important to reduce length of programme so we can save
time for writing the program.
• For achieving above purpose we can go for different
programming format. In this format we have to prepare
two separate program. Main program and Sub program.
• In main program we have to define the stroke removal
cycle and in sub program we have to define only shape of
work piece by using interpolation.
• In stroke removal cycle we can find different parameters.
(STOCK REMOVAL CYCLE)

• Two type stock removal cycle


1. Turning Stock removal cycle- 95
2. Threading stock removal cycle-97
CYCLE-95 (TURNING STOCK REMOVAL
CYCLE)
Cycle 95 (“Name of Subprogramme”………)
1. Name of SubProgramme.
2.Infeed Depth, without sign.
3. Finishing Allowance along long axis.
4. Finishing Allowance along facing axis
5. Finishing Allowance suitable for contour.
6. Feed rate for plunging without relief cut.
7. Feed rate for plunging into relief cut.
8. Feed rate for finishing.
9. Operation.
10. Dwell to chip break during rouging.
11. Path for roughing interrupt chip breaking.
12. Retract path from contour, incremental.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 1.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 2.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 3.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 4.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 5.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 6.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 7.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 8.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 9.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 10.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 11.
CYCLE-95 (STOCK REMOVAL CYCLE)
- Operation Number 12.
THREAD CUTTING STOCK REMOVAL CYCLE
CYCLE97
• Thread Lead as a Value
• Thread Lead as Thread size
• Thread Starting Point along Long. Axis
• Thread End Point along Long. Axis
• Diameter as thread Starting
• Diameter at thread end point
• Run In Path
• Run Out Path
• Thread Depth
• Finishing Allowances
• In-feed Angle
• Number of roughing Cut
• Number of finishing Cut
COMPONENT FOR CNC PART PROGRAMMING
• Write a program of CNC Turning Centre for following
• component as shown in FIG(A):
• Raw Material Size : 30Ø mm X 80 mm Long
COMPONENT FOR CNC PART PROGRAMMING
WITH OUT STOCK REMOVAL CYCLE
• N10 G71 G90 G95 Lf
• N20 M06 T7 D1 Lf
• N30 M03 S2100 Lf
• N40 G00 X31 Z5 Lf
• N50 G01 X31 Z-60 F0.1 Lf
• N60 G00 X33 Z5 Lf
• N70 G00 X30 Z5 Lf
• N80 G01 X30 Z-60 F0.1 Lf
• N90 G00 X33 Z5 Lf
• N100 G00 X29 Z5 Lf
• N110 G01 X29 Z-40 F0.1 Lf
• N120 G00 X33 Z5 Lf
• N130 G00 X28 Z5 Lf
• N140 G01 X28 Z-40 F0.1 Lf
• N150 G00 X33 Z5 Lf
• N160 G00 X27 Z5 Lf
• N170 G01 X27 Z-40 F0.1 Lf………………………………..
EXAMPLE OF PART PROGRAMMING
• RAW MATERIALS : MILD STEEL
• SIZE : 55 DIA X 80 mm LONG
• MACHINE : SIMANS TURNING CENTER
802 D CONTROLLER
EXAMPLE OF PART PROGRAMMING
MAIN PROGRAM
PROGRAM NAME: JOB1

• N10 G710 G71 G90 G95 Lf


• N20 M06 T1 D1 Lf N30 M03 S2500 Lf N40 G00 X0 Z3 Lf
• N50CYCLE95(“SUBTUR1”,0.5,0.4,0.1,0.1,0.09,0.05,0.01,
0.01,9,,,) Lf
• N60 G00 X100 Z100 Lf
• N70 M30
SUBROUTINE PROGRAM
SUB PROGRAM NAME: SUBTUR1
• N10 G01 X0 Z0 Lf
• N20 X25 Z-10 Lf
• N30 X25 Z-15 Lf
• N40 G03 X25 Z-30 CR=7.5 Lf
• N50 G01 X25 Z-50 RND=7.5 Lf
• N60 X40 Z-50 Lf
• N70 X40 Z-60 Lf
• N80 X50 Z-60 Lf
• N90 X50 Z-60 CHF=2 Lf
• N100 X50 Z-65
• N110 M17
THANK YOU

You might also like