Notes-unit-IV Fundamental of Cnc and Part Programing
Notes-unit-IV Fundamental of Cnc and Part Programing
Introduction to CNC systems • Each axis consists of a mechanical component, such as a slide that moves,
a servo drive motor that powers the mechanical movement, and a ball
• By integrating a computer processor, computer numerical control, or screw to transfer the power from the servo drive motor to the mechanical
“CNC” as it is now known, allows part machining programs to be edited component. These components, along with the computer controls that
and stored in the computer memory as well as permitting diagnostics and govern them, are referred to as an axis drive system.
quality control functions during the actual machining.
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
• If a rotary table is added to the machine table, then the fourth axis is
designated the “b” axis.
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
Central Processing Unit (CPU)
• The CPU is the heart of a CNC system. It accepts the information stored in
the memory as part program. This data is decoded and transformed into
specific position control and velocity signals. It also oversees the
movement of the control axis or spindle and whenever this does not match
with the programmed values, a corrective action as taken.
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
Other Peripheral Devices • Feed axis motion commands to the amplifier circuits for driving the axis
• These include sensor interface, provision for communication equipment, mechanisms
programming units, printer, tape reader interface, etc. • Receive the feedback signals of position and speed for each drive axis
• Implement auxiliary control functions such as coolant or spindle on/off,
Construction features including structure : and tool change
The machine control unit (MCU) is the heart of a CNC system. It is used to
perform the following functions:
• Read coded instructions Open-Loop System
• Decode coded instructions
• In the open-loop control system, the programmed instructions are fed into
• Implement interpolations (linear, circular, and helical) to generate axis
the controller through an input device.
motion commands
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
• These instructions are then converted to electrical pulses (signals) by the (d) According to the programming mode used
controller and sent to the amplifier to energize the stepper motors. 1. Closed-loop system
• A stepping motor is defined as one whose output shaft rotates through a
fixed angle in response to a given input pulse. 2. Open-loop system.
• The stepping motors are the simplest way for converting the digital (e) According to the controller design
electrical signals
1. Hybrid CNC
Closed-Loop System 2. Straight CNC.
• The closed-loop system has a feedback subsystem to monitor the actual Introduction of Part Programming
output and
• Correct any discrepancy from the programmed input. These systems use • CNC instructions are called part program commands.
position and velocity feedback. A position transducer acts as a feedback • When running, a part program is interpreted one command line at a time
device. until all lines are completed.
• Commands, which are also referred to as blocks, are made up of words
Classifications of CNC Systems which each begin with a letter address and end with a numerical value.
• Each letter address relates to a specific machine function. “G” and “M”
CNC systems are broadly classified as follows: letter addresses are two of the most common. A “G” letter specifies certain
machine preparations such as inch or metric modes, or absolutes versus
(a) According to the structure of the control system used incremental modes.
• A “M” letter specifies miscellaneous machine functions and work like
1. Analog system
on/off switches for coolant flow, tool changing, or spindle rotation. Other
2. Digital system. letter addresses are used to direct a wide variety of other machine
commands.
(b) According to the type of control loop used
• Optimum machine programming requires consideration of certain machine
1. Closed-loop system operating parameters including:
o Positioning control
2. Open-loop system.
o Compensations
(c) According to the type of tool motion control system used o Special machine features
1. Point-to-point or positioning system • Positioning control is the ability to program tool and machine slide
movement simultaneously along two or more axes. Positioning may be for
2. Continuous path system. point-to-point movement or for contouring movement along a continuous
a) Straight-cut system path. Contouring requires tool movement along multiple axes
simultaneously. This movement is referred to as “Interpolation” which is
b) Contouring system the process of calculating intermediate values between specific points
along a programmed path and outputting those values as a precise motion.
Interpolation may be linear having just a start and end point along a
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
straight line, or circular which requires an end point, a center and a G Codes
direction around the arc.
G00 Rapid traverse
Part Program:
G01 Linear interpolation
A part program is a series of coded instructions required to produce a part. G02 Circular interpolation, CW
It controls the movement of the machine tool and the on/off control of
auxiliary functions such as spindle rotation and coolant. The coded G03 Circular interpolation, CCW
instructions are composed of letters, numbers and symbols and are G04 Dwell
arranged in a format of functional blocks as in the following example
G08 Acceleration
N10 G01 X5.0 Y2.5 F15.0 G09 Deceleration
N10 - Sequence number G17 X-Y Plane
G01 - Linear interpolation mode G18 Z-X Plane
X5.0 - X-coordinate (5.0")
G19 Y-Z Plane
Y2.5 - Y-coordinate (2.5")
F15.0 - Feed rate (15 in/min) G20 Inch Units (G70)
G21 Metric Units (G71)
Program Input Devices : G40 Cutter compensation – cancel
The program input device is the mechanism for part programs to be G41 Cutter compensation – left
entered into the CNC control. The most commonly used program input G42 Cutter compensation- right
devices are keyboards, punched tape reader, diskette drivers, throgh RS
232 serial ports and networks. G70 Inch format
G71 Metric format
CNC Programming :
G74 Full-circle programming off
• Offline programming linked to CAD programs. G75 Full-circle programming on
• Conversational programming by the operator.
G80 Fixed-cycle cancel
• MDI ~ Manual Data Input.
• Manual Control using jog buttons or `electronic handwheel'. G81-G89 Fixed cycles
• Word-Address Coding using standard G-codes and M-codes. G90 Absolute dimensions
G91 Incremental dimensions
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
M Codes Turning Program No :1
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
Turning Program No :1 Procedure N0060 T0404
O0013 T0404 Select tool number 404
Program identification number N0070 G57 G00 X22.50 Z2.0 S500
N0005 G53 G57 PS0
To cancel any previous working zero point G00 Rapid movement (no cutting)
N0010 T0303 X22.50 X location (as a diameter; 11.25 form zero)
N0010 Sequence number Z2.0 Z location
T0303 Select tool number 303 S500 Spindle speed is 500 rpm
N0020 G57 G00 X26.0 Z0.0 S500 M04 N0080 G01 Z-30.0 F100
G57 To set the working zero point as saved G01 Linear interpolation (cutting)
G00 Rapid movement (no cutting) Z-30 Move only in z direction (external turning)
X26.0 X location (as a diameter; 13 form zero) F100 Set feed rate to 100 mm/min.
Z0.0 Z location N0090 G00 X23.0 Z2.0 S500
S500 Spindle speed is 500 rpm G00 Move rapidly away from work piece (no cutting) to location x= 23.0 (11.50
M04 Rotate spindle counterclockwise from zero) and z = 2.0.
N0030 G01 X-0.20 F100 N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650
G01 Linear interpolation (cutting) G84 Turning cycle for machining the step
X-0.20 Move only in x direction until you pass the center by 0.1 mm (facing) X17.5 final diameter
F100 Set feed rate to 100 mm/min. Z-20 length of step is 20 mm
N0040 G00 Z2.0 D0=200 Finish allowance in X direction (0.2 mm) D2=200 Finish allowance in Z
G00 Move rapidly away from work piece (no cutting) direction (0.2 mm)
Z2.0 the movement is 2 mm away from the face. D3=650 Depth of cut in each pass (0.65 mm)
N0050 X50.0 Z50.0 N0110 G00 Z2.0
Go to a safe location away from the work piece [x = 50 (25 from zero), z = 50] to G00 Move rapidly away from work piece (no cutting)
change the tool. Z2.0 the movement is 2 mm away from the face.
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
N0120 X50.0 Z50.0 N007 G01 X30 Y60 Z-0.5 XY F 75
X50.0 Z50.0 Move to the tool changing location N008 G01 X0 Y40 Z-0.5 XY F 75
N0130 M30 N009 G01 X0 Y0 Z-0.5 XY F 75
M30 Program End N010 G81 R3 E9 N7 Z-0.5
N011 M05
Milling Program No :1 N012 M02
Tool Change
G55 X200 Y80
Program 2
N001 M06 T2
N002 M03 rpm 400
N003 G01 X-8 Y0 Z0 XY F 150
N004 G01 X20 Y15 Z10 XY F 150 Z F 150
N005 G01 X20 Y15 Z-10 Z F 75
N006 G01 X20 Y15 Z10 Z F 150
N007 G01 X50 Y15 Z10 Z F 150
N008 G01 X50 Y15 Z-10 Z F 75
N009 G01 X50 Y15 Z10 Z F 150
G55 X200 Y80
N010 G01 X50 Y45 Z10 Z F 150
Program 1
N011 G01 X50 Y45 Z-10 Z F 75
N001 M06 T1
N012 G01 X50 Y45 Z10 Z F 150
N002 M03 S 400
N013 M05
N003 G01 X-8 Y0 Z0 XY F 150
N014 M02
N004 G01 X-8 Y0 Z-0.5 Z F 150
N005 G01 X70 Y0 Z-0.5 XY F 75
N006 G01 X70 Y60 Z-0.5 XY F 75
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
Milling Program No :1 Procedure N008 G01 X0 Y40 Z-0.5 XYFeed 75
Cutting to X=0 & Y=40
G55 X200 Y80 N009 G01 X0 Y0 Z-0.5 XYFeed 75
Setting the datum to the lower left corner of the work piece Complete the countering
Program 1 N010 G81 R3 E9 N7 Z-0.5
Program Identification Number Repeat 7 times blocks from N003 to N009 with incremental offset of Z=-0.5
N001 M06 T1 N011 M05
N001 Sequence Number Spindle Off
M06 Tool Change (End Mill with Diameter=12mm) N012 M02
T1 Tool Number End Program
N002 M03 rpm 400 Tool Change
Start rotating the spindle clockwise with 400 rpm Changing the tool
N003 G01 X-8 Y0 Z0 XYFeed 150 G55 X200 Y80
Go to Safe Position with feed 150mm/min Setting the datum to the lower left corner of the work piece
N004 G01 X-8 Y0 Z-0.5 ZFeed 150 Program 2
Lower the end mill to determine the depth of cut Program Identification Number
N005 G01 X70 Y0 Z-0.5 XYFeed 75 N001 M06 T2
Move from the lower left corner of the work piece to the right lower one cutting N001 Sequence Number
with feed=75mm/min M06 Tool Change (Drill with Diameter=6mm
N006 G01 X70 Y60 Z-0.5 XYFeed 75 T2 Tool Number
Move from the lower left corner of the work piece to the right lower one cutting N002 M03 rpm 400
with feed=75mm/min Start rotating the spindle clockwise with 400 rpm
N007 G01 X30 Y60 Z-0.5 XYFeed 75 N003 G01 X-8 Y0 Z0 XYFeed 150
Cutting the horizontally up to X=30 Go to Safe Position with feed 150mm/min
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150 Threading Program No :3
Stop above the center of the first hole
N005 G01 X20 Y15 Z-10 ZFeed 75
Start Drill the first hole
N006 G01 X20 Y15 Z10 ZFeed 150
Retract to a position above the hole
N007 G01 X50 Y15 Z10 ZFeed 150
Stop above the center of the second hole
N008 G01 X50 Y15 Z-10 ZFeed 75
Drill the second hole
N009 G01 X50 Y15 Z10 ZFeed 150
Retract to a position above the second hole
O999
N010 G01 X50 Y45 Z10 ZFeed 150 N001 G20 G40 G99
N002 G28 U0
Stop above the center of the third hole
N003 G28 W0
N011 G01 X50 Y45 Z-10 ZFeed 75 N004 T0 505
N005 G 54
Drill the third hole
N006 G97 S2037 M3
N012 G01 X50 Y45 Z10 ZFeed 150 N007 G0 Z2.25
N008 X0.945 M8
Retract to a position above the third hole
N009 G92 X0.720 Z1.0 F0.0625
N013 M05 N010 X0.705
N011 X0.690
Spindle off
N012 X0.680
N014 M02 N013 X0.677
N014 X0.674
End Program
N015 M9
N016 M5
N017 G28 U0
N018 G28 W0
N019 M30
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College
Part-A (ii) Discuss about slide ways used in CNC machine tools, for various
1. Mention the points to be considered while designing of CNC tooling. applications.
2. List the features of NC part programming. 2. Describe 2D and 3D machining in CNC machines with a suitable example.
3. State the advantages of integrating computer with NC machine tools. 3. Describe about spindles used in CNC machine tools.
4. Mention the various problems with conventional NC machines. 4. Describe the functions of feed drives. Also state the requirement of the
5. Name the methods of specifying the zero point. drives in CNC machine tools.
6. Enumerate about linear bearings. 5. Write the part program for the part shown below
7. State the advantages of incremental positioning.
8. List the elements of NC system.
9. Name the various elements of CNC machines.
10. Distinguish between open and closed loop system.
11. Draw the simple configuration of CNC.
12. Classify CNC systems.
13. Distinguish NC and CNC systems.
14. Why re-circulating screws are used in CNC machines? 6. Explain the following in CNC machining. (i) Linear interpolation (ii)
15. Differentiate machine reference and tool reference point. Circular interpolation (iii) Cubic interpolation
16. Give the general form of a program line. 7. Write the part program for the part shown below
ME8691 COMPUTER AIDED DESIGN AND MANUFACTURING Mr. S.K. DINESH KUMAR /AP –MECHANICAL ENGG-Sri Sairam Engineering College