Académique Documents
Professionnel Documents
Culture Documents
(CAM)
UPE 704
Credits 4.5
It is the removal of materials in forms of chips from the
workpiece by shearing with a sharp tool.
The main function of a machine tool is to control the
work piece‐cutting tool positional relationship in such a
way as to achieve a desired geometric shape of the work
piece with sufficient dimensional accuracy.
CLASSIFICATION OF MACHINE TOOLS
1949
US Air Force asks MIT to develop a "numerically controlled"
machine.
1952
Prototype NC machine demonstrated (punched tape input)
1980-
CNC machines (computer used to link directly to controller)
1990-
DNC: external computer “drip feeds” control programmer to
machine tool controller
Basic Components of NC System
• Program of instructions
• Controller unit
• Machine tool
Punched tapes
Modern Controllers
PT Controller
ADVANTAGES OF CNC
Open loop
Closed loop
CNC Machines
CNC Lathe CNC Milling
CNC Machine
Coordinate Systems
COORDINATE SYSTEM: Milling Machine
• Z‐Axis along Spindle.(Z+ Gap Increase)
• X‐Axis Horizontal and parallel to the work
holding surface to the right when viewed
from spindle towards column.(For vertical
Machines)
• Y‐axis Apply R.H.S.
• X‐Axis Horizontal and parallel to the work
holding surface when viewed from spindle
towards column.(For horizontal Machines)
COORDINATE SYSTEM: STANDARD LATHE
• Z‐Axis along Spindle.
• X‐Axis Parallel to cross slide.
• No Y‐axis in Lathe.
NC/CNC Part
Programming formats
Informatıon needed
in a Part Programme block
One line/instruction of the Part program is called as BLOCK.
1. Line Number (Sequential)N
2. Preparatory Information: units, incremental or absolute positioning G
3. Coordinates X, Y, Z, A, B, C, I, J, K, R etc.
4. Machining Parameters: Feed rate and spindle speed F,S
5. Tool Control: Tool and tool parameters T
6. Miscellaneous Control: Spindle on/off, direction of rotation, stops for
part movement, Coolant Control M
This Information is conveyed to the machine through a set of
instructions arranged in a desired sequence called – NC Program
NC/CNC Part Programming formats
Line (No) Prep‐Code X‐coord Y‐coord Z‐coord Feed Speed Tool Misc‐Code
0050 00 +0025400 +0012500 +0000000 0000 00
0060 01 +0025400 +0012500 ‐0010000 0500 08
0070 00 +0025400 +0012500 +0000000 0000 09
• Least Flexible.
• No. of words/block is same.
• Each word of same length, format and sequence.
• Non changing word to be repeated.
TAB sequential format
Line (No) TAB Prep‐Code TAB X‐coord TAB Y‐coord TAB Z‐coord TAB Feed TAB Speed TAB Tool TAB Misc‐Code
0050 TAB 00 TAB +0025400 TAB +0012500 TAB +0000000 TAB TAB
0060 TAB 01 TAB TAB TAB ‐0010000 TAB 0500 TAB 08
0070 TAB 00 TAB TAB TAB ‐0000000 TAB 0000 TAB 09
• Words in fixed sequence.
• Separated by TABs.
• Same word may not be repeated.
Word address format
N50 G00 X250 Y125 Z0; • N‐Word
N60 G01 Z‐100 F500 ; • G‐Word
N70 G00 Z0 ;
• X,Y,Z –Word
• F‐Word
• No fixed sequence requirement.
• T‐Word
• Alphabet precedes each word
• M‐Word
to identify the type of command
• S‐Word
and data for MCU.
• EOB
• Any sequence of words.
• Non‐changing words may be
missed .
Word Address Format
Word Format of a Block
Individual Words
September 2, 2019 MED, Thapar University 26
September 2, 2019 MED, Thapar University 27
G Codes
G00 Rapid Traverse Modal
G01 Linear interpolation Modal
G02 Circular interpolation (CW) Modal
G03 Circular interpolation (CCW) Modal
G04 Dwell Non-modal
G20 Inch units Modal
G21 Metric units Modal
G28 Automatic return to reference point
G40 Cutter compensation cancel Modal
G41 Cutter compensation left Modal
G42 Cutter compensation right Modal
G Codes
G73 High-speed peck drilling Modal
G80 Cancel canned cycles Modal
G81 Drilling cycle Modal
G82 Counter boring cycle Modal
G83 Deep hole drilling cycle Modal
G90 Absolute positioning Modal
G91 Incremental positioning Modal
M Codes
M03 Spindle rotation (cw)
M04 Spindle rotation (ccw)
M05 Spindle stop
M06 Tool Change
M08 Coolant on
M09 Coolant off
M30 End of Program, Spindle off, Coolant off, reset
September 2, 2019 MED, Thapar University 31
September 2, 2019 MED, Thapar University 32
September 2, 2019 MED, Thapar University 33
EXAMPLE: G03 X1 Y1 I0 J‐1
The G03 command requires an endpoint and a radius in order to
cut the arc. Start point of this arc is (X2, Y2) and the end‐point is
(X1, Y1). To find the radius, simply measure the incremental
distance from the start point to the center point of the arc.
G03 X1 Y1 R1
OR
G03 X1 Y1 I0 J‐1
September 2, 2019 MED, Thapar University 35
September 2, 2019 MED, Thapar University 36
Absolute v/s Incremental
Programming
Absolute v/s Incremental Programming
30
(4) 30
(3)
20
1 (0,0) (0,0)
2 (70,0) (70,0)
3 (70,20) (0,20)
4 (40,20) (-30,0)
5 (40,50) (0,30)
6 (0,50) (0,-40)
Sample Program (G01):
Workpiece Size: X4, Y3, Z1
Tool: Tool #3, 3/8" Slot Drill
Tool Start Position: X0, Y0, Z1
N5 G90 G20 (Block #5, absolute in inches)
N10 M06 T3 (Tool change to Tool #3)
N15 M03 S1250 (Spindle on CW at 1250 rpm)
N20 G00 X1.0 Y1.0 (Rapid over to X1,Y1)
N25 Z0.1 (Rapid down to Z0.1)
N30 G01 Z-0.125 F5 (Feed down to Z–0.125 at 5 ipm)
N35 X3 Y2 F10 (Feed diagonally to X3,Y2 at 10 ipm)
N40 G00 Z1.0 (Rapid up to Z1)
N45 X0.0 Y0.0 (Rapid over to X0,Y0)
N50 M30 (Program end)
Sample Program (G02):
Workpiece Size: X4, Y3, Z1
Tool: Tool #2, 1/4" Slot Drill
Tool Start Position: X0, Y0, Z1
N5 G90 G20
N10 M06 T2
N15 M03 S1200
N20 G00 X1 Y1
N25 Z0.1
N30 G01 Z‐0.1 F5
N35 G02 X2 Y2 I1 J0 F20 (Arc feed CW, radius I1,J0 at 20 rpm)
N40 G01 X3.5
N45 G02 X3 Y0.5 R2 (Arc feed CW, radius 2)
N50 X1 Y1 R2 (Arc feed CW, radius 2)
N55 G00 Z0.1
N60 X2 Y1.5
N65 G01 Z‐0.25
N70 G02 X2 Y1.5 I0.25 J‐0.25 (Full circle arc feed move CW)
N75 G00 Z1
N80 X0 Y0
N85 M05
N90 M30
Sample program (G41): N55 G01 X0.5
Workpiece Size: X5, Y4, Z1 N60 Y0.5
N65 G00 Z1
Tool: Tool #1, 1/4" Slot Drill
N70 X0 Y0
Tool #4, 1/2" End Mill N75 M06 T04
Register: D11 is 0.25" N80 M03 S1000
Tool Start Position:X0, Y0, Z1 N85 G00 X0.75 Y1
N90 Z0.125
% N95 G01 Z‐0.25 F5
:1012 N100 G41 X0.5 Y0.5 D11 F20
N5 G90 G20 G40 G17 G80 N105 X2
N10 T01 M06 N110 X2.5 Y1
N15 M03 S2000 N115 Y2
N20 G00 X0.5 Y0.5 N120 G03 X2 Y2.5 R0.5
N25 Z0.1 N125 G01 X0.5
N30 G01 Z‐0.25 F5 N130 Y0.5
N135 G40 X0.75 Y0.75
N35 X2 F15
N140 G00 Z1
N40 X2.5 Y1 N145 X0 Y0
N45 Y2 N150 M05
N50 G03 X2 Y2.5 R0.5 N155 M30
Programming for Profile Milling Operation
G21 G94
G91 G28 Z0
G28 X0 Y0
M06 T1
M03 S1500
G90 G00 G42 X0 Y0 Z10
G01 X30 Y-20 F100
G01 Z-1 F100
G01 X30 Y20
G02 X20 Y30 R10
G01 X-20 Y30
G03 X-30 Y20 R10
G01 X-30 Y-20
G02 X-20 Y-30 R10
G01 X20 Y-30
G01 X30 Y-20
G01 X30 Y0
G40
G00 Z5
G91 G28 Z0
G28 X0 Y0
M05
M30
Write a manual part program for machining the component shown in Figure
below
COMPUTER AIDED MANUFACTURING
(CAM) UPE 704
CNC Programming
for
Milling Operations
Six Operations
1 ‐ Positioning of the X and Y axes.
2 ‐ Rapid traverse in the Z axis to the
"R“ point.
3 ‐ Hole machining procedure.
4 ‐ Operation at bottom of hole.
5 ‐ Retraction to R point.
6 ‐ Rapid traverse in the Z axis to the
Initial level.
G Codes: Canned Cycles
• G80 – Cancel canned cycle
• G81 – Drilling cycle
Three command modes for canned
• G83 – Peck drilling cycle cycles:
• G84 – Tapping cycle 1) Data Format (G90 and G91).
• G85 – Boring cycle 2) Return Point Level (G98 and
G99).
• G86 – Boring cycle 3) Cycle Mode (G73 to G89).
• NOTE: A canned cycle stays in
effect until cancelled by a G80.
G81 Drilling Cycle
Format: N_ G81 X_ Y_ Z_ R_ F_
• Example of program code:
• M06 T05
• M03 S2000
• G90 G00 X30 Y20 Z10
• G81 G99 X30 Y20 Z‐10 R2 F200
• X40
• X60
• G80
G83 Deep Hole (peck) Drilling Cycle
Format: N_ G83 X_ Y_ Z_ R_ Q_ F_
Rapid position to X, Y and Z
(the initial level).
Rapid traverse to R point
level.
Feed in to the value of Q.
Rapid traverse out to R
point. Rapid traverse back
to within 1mm of depth of
Q cut. Operation
moves 2 and 4 are repeated
until Z depth is
reached.
Rapid traverse to Initial
level (G98) or R point
level (G99).
G73 High‐Speed Peck Drilling Cycle
Format: N_ G73 X_ Y_ Z_ R_ Q_ F_
G76 Fine Boring
Format: N_ G90 (91) G98(99) G76 X_ Y_ Z_ R_ P_Q_ F_
Rapid position to X, Y and Z
(the Initial level).
Rapid traverse to R point
level.
Feed to Z depth.
Dwell P (time for spindle
stop and move Q value).
Feed to R point level.
Move back Q value.
Canned Cycles: G84, G85, G86
• G84 – Tapping Cycle
• This cycle creates internal threads in an existing hole.
• NOTE: One cannot over‐ride the feed rate.
• G84 X Y Z R P
• G85 ‐ Boring Cycle
• Feed to depth, feed back out.
• G85 X Y Z F
• G86 – Boring Cycle
• Feed to depth, rapid out.
• G86 X Y Z F
G170‐173 Pocket Milling
The following canned cycles, when programmed correctly, will
machine either a circular pocket to any diameter and depth, or a
rectangular pocket to any side length and depth.
G170‐171 (CIRCULAR POCKET MILLING)
G172‐173 (RECTANGULAR POCKET MILLING)
G170‐171 Circular Pocket Milling
G170‐171 Circular Pocket Milling
R defines the position of the tool to start cycle (surface of job).
P defines when P is zero the cycle is a roughing cycle.
Q defines the peck increment, in program number
(2 pecks each of 3mm.)
X defines the pocket centre in X axis
Y defines the pocket centre in Y axis
Z defines the pocket base (‐6mm) from job surface.
I defines the side finish allowance (0, as this is a roughing cycle).
J defines the base finish allowance (0, as this is a roughing cycle ).
K defines the radius of pocket (‐24)
negative value means cut in CCW direction).
G170‐171 Circular Pocket Milling
P defines the cut width percentage.
S defines the roughing spindle speed (S3000).
R defines the roughing Feed in Z (75).
F defines the roughing feed XY (250).
B defines the finishing spindle speed
(3500, not applicable as roughing only).
J defines the finishing feed
(200, not applicable as roughing only).
G170‐171 Circular Pocket Milling
G170‐171 Circular Pocket Milling
G170‐171 Circular Pocket Milling
G170‐171 Circular Pocket Milling
G172‐173 Rectangular Pocket Milling
G172‐173 Rectangular Pocket Milling
G172‐173 Rectangular Pocket Milling
G172‐173 Rectangular Pocket Milling
(Roughing & Finishing)
G172‐173 Rectangular Pocket Milling
(Roughing & Finishing)
G172‐173 Rectangular Pocket Milling
(One Step Finishing)
G172‐173 Rectangular Pocket Milling
(One Step Finishing)
Feed and Speed Calculations
September 2, 2019 MED, Thapar University 77
Thank You