100% found this document useful (1 vote)
153 views165 pages

Machining Center: Monday, April 20, 2020 Mechanical Engineering Department

The document discusses different types of machining centers including vertical and horizontal configurations. It describes the axis conventions for machining centers including the X, Y, and Z axes. It also discusses concepts like work zeros, tool changing, and machine coordinates.

Uploaded by

Amit T.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
153 views165 pages

Machining Center: Monday, April 20, 2020 Mechanical Engineering Department

The document discusses different types of machining centers including vertical and horizontal configurations. It describes the axis conventions for machining centers including the X, Y, and Z axes. It also discusses concepts like work zeros, tool changing, and machine coordinates.

Uploaded by

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

Machining Center

Monday, April 20, 2020 Mechanical Engineering Department 1


Machine Configurations

Monday, April 20, 2020 Mechanical Engineering Department 2


Machine configurations

Vertical machining center

Horizontal machining center

Monday, April 20, 2020 Mechanical Engineering Department 3


Vertical
Machining Centers

Monday, April 20, 2020 Mechanical Engineering Department 4


AXIS AND MOTION NOMENCLATURE

X-AXIS

The axis is always horizontal and parallel to


the work holding surfaces.
Positive x-axis is to the right when looking
from the spindle towards the work piece.

Monday, April 20, 2020 Mechanical Engineering Department 5


Y-AXIS

The perpendicular to both X and z


axis. The positive direction of
Y axis is away from the spindle
looking from spindle towards the
work piece.

Monday, April 20, 2020 Mechanical Engineering Department 6


Z-AXIS

The axis is the main machine


spindle axis. The axis is
positive in a
Direction away from work
piece towards the spindle.

Monday, April 20, 2020 Mechanical Engineering Department 7


Z+
Axis Directions Y-
X plus is tool movement
to the right

Z plus is tool
movement upward X- X+
Y+
Y+
Z-

Y plus is tool movement


Monday, April 20, 2020 Mechanical Engineering Department towards operator 8
Axis Directions Y minus is tool
Y- movement towards
X minus is tool column
movement to the left
X-

Z-

Z minus is tool
movement towards
Monday, April 20, 2020 Mechanical Engineering Department
down 9
If a rotary table is placed
on table

Parallel
A axis
to X axis

Monday, April 20, 2020 Mechanical Engineering Department 10


If parallel to the Y axis, its
named the B axis

Parallel
B axis to Y axis

Monday, April 20, 2020 Mechanical Engineering Department 11


C-frame style
If parallel to the Z axis, its
named the C axis

Parallel
C axis to Z axis

Not all machine tool


builders adhere to these
naming conventions!
Monday, April 20, 2020 Mechanical Engineering Department 12
Horizontal machining center

Monday, April 20, 2020 Mechanical Engineering Department 13


Y+
Z-
Horizontal Style
X- X+

Z+
Y-

Monday, April 20, 2020 Mechanical Engineering Department 14


ZERO POINTS REFERENCE POINT

Monday, April 20, 2020 Mechanical Engineering Department 15


The reference point R serves for calibrating and for controlling of
measuring systems of the slides and tool traverses. The position of the
reference point is accurately predetermined in every traverse axis by
the trip dogs and limit switches. Therefore, the reference point
coordinates always have the same, precisely known numerical value in
relation to the machine zero point.
After initiating the control system, the reference point must always be
approached from all axes to calibrate the traverse measuring system.

Monday, April 20, 2020 Mechanical Engineering Department 16


Program Zero

Quadrant Two Quadrant One


X-,Y+ X+,Y+

Quadrant Three Quadrant Four


X-,Y-
X+,Y-

Monday, April 20, 2020 Mechanical Engineering Department 17


Z Axis At Zero Return Position
X12.3232
Y11.2357
Z13.0294

Spindle Nose

Z
Measurement

Program Zero

Monday, April 20, 2020 Mechanical Engineering Department 18


X11.4843
Y7.4637
Z1.2544

Monday, April 20, 2020 Mechanical Engineering Department 19


X11.4843
Y7.4637
Z00.0000

Monday, April 20, 2020 Mechanical Engineering Department 20


X11.4843
Y7.4637
Z11.7750

Monday, April 20, 2020 Mechanical Engineering Department 21


WORK ZERO OFFSET O0001 N0005

NO. 00 (COMMON) NO. 02 (G55)


X 0.0000 X 0.0000
Y 0.0000 Y 0.0000
Z 0.0000 Z 0.0000

NO. 01 (G54)
X 0.0000 NO. 03 (G56)
Y 0.0000 X 0.0000
Z 0.0000 Y 0.0000
Z 0.0000

Monday, April 20, 2020 Mechanical Engineering Department 22


WORK ZERO OFFSET O0001 N0005

NO. 00 (COMMON) NO. 02 (G55)


X 0.0000 X 0.0000
Y 0.0000 Y 0.0000
Z 0.0000 Z 0.0000

NO. 01 (G54)
X 0.0000 NO. 03 (G56)
Y 0.0000 X 0.0000
Z 0.0000 Y 0.0000
Z 0.0000

Example Measurements:
X: 12.3412 Y: 11.2364 Z: 9.5423
Monday, April 20, 2020 Mechanical Engineering Department 23
WORK ZERO OFFSET O0001 N0005

NO. 00 (COMMON) NO. 02 (G55)


X 0.0000 X 0.0000
Y 0.0000 Y 0.0000
Z 0.0000 Z 0.0000

NO. 01 (G54)
X -12.3412 NO. 03 (G56)
Y -11.2364 X 0.0000
Z -9.5423 Y 0.0000
Z 0.0000

Example Measurements:
X: 12.3412 Y: 11.2364 Z: 9.5423
Monday, April 20, 2020 Mechanical Engineering Department 24
Tool changing

Double arm style

Monday, April 20, 2020 Mechanical Engineering Department 25


Tool changing (double arm style)

T55

Tool station
number 15

Monday, April 20, 2020 Mechanical Engineering Department 26


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 27


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 28


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 29


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 30


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 31


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 32


Tool changing (double arm style)

T15 M06
T55

Monday, April 20, 2020 Mechanical Engineering Department 33


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 34


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 35


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 36


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 37


Tool changing (double arm style)

T15 M06

Monday, April 20, 2020 Mechanical Engineering Department 38


Feed rate F & Spindle Speed S
Function F and S code
These are given according to the tools to be used
and the material of them, workpiece to be cut.

F01 1 mm/min
F10.0 10 mm/min
F1000 1000 mm/min
S10 10 revolutions per min ( rpm )
S1500 1500 revolutions per min.
S400 400 revolutions per min.

Monday, April 20, 2020 Mechanical Engineering Department 39


RPM & Feed Formula
Cutting Speed ( m/min ) * 318
RPM = Diameter

Milling Feed = RPM * No. of tooth * Feed per

tooth

Drill Feed = RPM * Feed per revolution

Tap Feed = RPM * Pitch


Monday, April 20, 2020 Mechanical Engineering Department 40
Calculation RPM & Feed
• Cutting Speed = 250 m/min
• Cutting Diameter = Ø 10 mm
• No. of tooth = 2
• Feed per tooth = 0.1
• Your answer is

RPM = 7950 Feed = 1590

Monday, April 20, 2020 Mechanical Engineering Department 41


Calculation Cutting Speed & Feed per
tooth

• Rpm = 15000 rev/min


• Feed = 3000 mm/min
• No of tooth = 2
• Cutter diameter = 6 mm
• Your Answer is

Cutting Speed = 283 Feed per tooth = 0.1

Monday, April 20, 2020 Mechanical Engineering Department 42


WHAT IS PROGRAMING ?

Programming is the process of creating a set commands


Such as cutter movement,feedrate and spindle speed ,
In order for the machine to perform some operations.

When programming, always based on the principle that


only the cutter moves while the work piece is fixed.

Monday, April 20, 2020 Mechanical Engineering Department 43


CONCEPT OF PROGRAMMING

Program is a set of instructions which machine can


understand.

For example, to drill a hole the following activities


To be done in a sequence:

Pickup the tool and in spindle/


Move (Rapid) the tool to drilling position.
Rotate spindle CW or CCW with required RPM.
Monday, April 20, 2020 Mechanical Engineering Department 44
Move down the tool near to drilling surface.
Switch on the coolant.
Move down the tool in cutting feed to
required drilling depth
Move back (Rapid) the tool from work
piece.
Switch off the coolant.
Switch off the spindle.

Monday, April 20, 2020 Mechanical Engineering Department 45


Tool At Start

Move To Hole Position


Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 46
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 47
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 48
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 49
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 50
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 51
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 52
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 53
Move To Hole Position
Move Just Above Hole
Top
View Turn On Spindle
Turn On Coolant
Plunge Hole
Move Out Of Hole
Move Away
Front
View Turn Off Spindle
Turn Off Coolant
Monday, April 20, 2020 Mechanical Engineering Department 54
A block may contain any or all of the following

N0000 G00 X000.000 Y000.000


M00 S0000 T00 H00 F;

Monday, April 20, 2020 Mechanical Engineering Department 55


Sample of Address

Function Address Meaning

Program number O O1000 ( test )


Sequence number N N10, N20, N30
Preparatory Function G G00, G01, command
machine
Dimensional words X,Y,Z Axes travel command
R Arc radius
I, J, K Arc center coordinates
Feed rate F F500 ( mm/min )
Spindle function S S1000 ( rpm )
Tool function T T10 ( Tool number 10 )
Miscellaneous Function M M3, M5, on/off control m/c
Offset number H,D H1 ( tool length), D32
(radius )
Dwell P,X Dwelling time
Program number command
Monday, April 20, 2020 P
Mechanical Engineering Department Sub program number 56
PREPARATORY FUNCTION
(G-codes)

These are codes which


prepare the machine to perform a
Particular function
likepositioning,countouring,canned cycle
etc.

Monday, April 20, 2020 Mechanical Engineering Department 57


Fanuc G CODES
G00 : Positioning in rapid
G01 : Linear positioning in feed
G02 : Circular Interpolation CW
G03 : Circular Interpolation CCW
G04 : Dwell
G10 : Data Setting
G15 : Polar co-ordinates command cancel
G16 : Polar co-ordinates command
G17 : XY Plane Selection
G18 : ZX Plane Selection
G19 : YZ Plane Selection
G20 : Input In Inch (G70)
G21 : Input In Metric (G71)
G28 : Return To Reference Position
G30 : 2nd, 3rd and 4th Reference Position Return
G31 : Skip Function

Monday, April 20, 2020 Mechanical Engineering Department 58


G43 : Tool Length Compensation + Direction
G44 : Tool Length Compensation – Direction
G49 : Tool length Compensation cancel
G52 : Local co-ordinate system setting
G53 : Setting Machine Coordinate System Selection
G54 : Work Piece Coordinate System 1
G55 : Work Piece Coordinate System 2
G56 : Work Piece Coordinate System 3
G57 : Work Piece Coordinate System 4
G58 : Work Piece Coordinate System 5
G59 : Work Piece Coordinate System 6
G60 : Single direction positioning
G61 : Exact stop mode
G63 : Tapping mode
G65 : Macro Call
G68 : Co-ordinate rotation
G69 : Co-ordinate rotation cancel

Monday, April 20, 2020 Mechanical Engineering Department 59


G73 : Peck drilling cycle
G74 : Counter tapping cycle
G76 : Fine Boring Cycle
G80 : Canned cycle cancel
G81 : Drilling Cycle
G82 : Counter Boring Cycle
G83 : Peck Drilling Cycle
G84 : Tapping Cycle
G85 : Boring Cycle
G86 : Boring Cycle
G87 : Back boring cycle
G88 : Boring cycle
G89 : Boring cycle
0 : Absolute Command
1 : Increment Command
4 : Feed Per Minute
5 : Feed Per Rotation
8 : Return To Initial Point In Canned Cycle
Monday, April 20, 2020 Mechanical Engineering Department 60
9 : Return To R Point In Canned Cycle
GC
des od
es
Co es Fo
G r Ax Ca r
Fo otion Cy nned
M cle
s

G Code G Co
Codes des
G Groups For T
For Com ool
r ence pens
Refe tion a
s

One Shot
G Codes

Monday, April 20, 2020 Mechanical Engineering Department 61


G CODES FOR AXES MOVEMENTS

G00 :Rapid positioning


G01 :Linear interpolation
G02 :Circular Interpolation CW
G03 :Circular Interpolation CCW

Monday, April 20, 2020 Mechanical Engineering Department 62


G CODES FOR REFERENCES

G53 :Setting Machine Coordinate System Selection


G54 :Work Piece Coordinate System 1
G55 :Work Piece Coordinate System 2
G56 :Work Piece Coordinate System 3
G57 :Work Piece Coordinate System 4
G58 :Work Piece Coordinate System 5
G59 :Work Piece Coordinate System 6
G90 :Absolute Command
G91
Monday, April 20, 2020
:Increment Command
Mechanical Engineering Department 63
G CODES FOR TOOL COMPENSATION

G40 :Cutter Compensation Cancel


G41 :Cutter Compensation Left
G42 :Cutter Compensation Right
G43 :Tool Length Compensation + Direction
G44 :Tool Length Compensation - Direction

Monday, April 20, 2020 Mechanical Engineering Department 64


G Code For Canned Cycles
G73 :Short Peck Drilling Cycle
G80 :Canned Cycle Cancellation
G81 :Drilling Cycle
G82 :Counter Boring Cycle
G83 :Long Peck Drilling Cycle
G84 :Tapping Cycle
G76 :Fine Boring Cycle
G86 :Boring Cycle
G98 :Return To Initial Point In Canned Cycle
G99
Monday, April 20, 2020
:Return To R Point In Canned Cycle
Mechanical Engineering Department 65
FUNDAMENTALS OF CNC PROGRAMMING

If several G codes of the same group are


specified in the same block, the last G
code is effective.

G01 G02 G03 G00 X100.0;

In this case, all G codes belong to the same


group and there fore the last G code i.e.,
G00 is effective, and X axis moves 100mm
in positive direction at rapid traverse.
Monday, April 20, 2020 Mechanical Engineering Department 66
MISCELLANEOUS FUNCTIONS (M-CODES)

These are the operations associated with


the machine for functions Other then
positioning or contouring, like coolant
off &on, spindle Rotation, program stop
etc.

Monday, April 20, 2020 Mechanical Engineering Department 67


STANDARD M-codes
M00 : Program stop
M01 : Optional stop
M02 : End of program
M03 : Spindle rotation CW
M04 : Spindle rotation CCW
M05 : Spindle stop
M06 : Tool change
M07 : Flood Coolant ON.
M09 : FLOOD Coolant off;
M19 : Spindle orientation
M20 : Spindle orientation release
M28 : Rigid tap MODE off
M29 : Rigid tap MODE on
M30 : End of program
M45 : Tool unclamp MODE ON
M98 : Sub program call
M99
Monday, April 20, 2020
: Sub program end
Mechanical Engineering Department 68
OPTIONAL M-codes
M12 : Component clamp
M13 : Component declamp
M14 : Rotary table clamp
M15 : Rotary table unclamp
M22 : pallet-1 load
M23 : pallet-1unload
M24 : pallet-2 load
M25 : pallet-2 unload
M31 : probe ON/OFF
M46 : Auto door close
M47 : Auto door open
M48 : Flush coolant ON
M49 : Flush coolant off
M52 : High pr.coolant-1(25 bar) ON
M53 : High pr.coolant-1(25 bar) OFF

Monday, April 20, 2020 Mechanical Engineering Department 69


M80 : Auto pallet change
M81 : Enable pallet-1 transfer in auto mode
M82 : Enable pallet-2 transfer in auto mode
M83 : Enable both pallet transfer in auto mode
M89 : Pallet-1Sub program
M90 : Pallet-2 Sub program
M91 : Tool monitoring auto interface enable
M92 : Tool monitoring auto interface disable
M93 : Tool monitoring AC enable during AID
M94 : Tool monitoring AC disable during AID
M97 : Part count.

Monday, April 20, 2020 Mechanical Engineering Department 70


DIMENSIONING

Co-ordinates specifying the destination dimensions


are programmed in to two ways.

a) Absolute dimension programming.

b) Incremental dimension programming.

Monday, April 20, 2020 Mechanical Engineering Department 71


Absolute G90
Function G90
• The destination of movement is specified with
the coordinate value regardless the current
position.
Y+
60
Y+

10 10
X+ X+
10 60 10

G90 X60.0 Y10.0 ; G90 X10.0 Y60.0 ;

Monday, April 20, 2020 Mechanical Engineering Department 72


Incremental G91
Function G91
• The movement is specified by the direction and
the incremental value to the destination referring
the current position. Y+
60
Y+

10 10
X+ X+
10 60 10
G91 X50.0 ; G91 Y50.0 ;

Monday, April 20, 2020 Mechanical Engineering Department 73


Absolute G90 & Incremental G91
For dimensional command use G90 or G91

From point A to point B Y+


ABS G90 X60.0 Y60.0 ; B
60
INC G91 X40.0 Y40.0 ;
From point B to point A
20 A
ABS G90 X20.0 Y20.0 ; X+
INC G91 X- 40.0 Y -40.0 ; 20 60

Monday, April 20, 2020 Mechanical Engineering Department 74


Information of ABS & INC

Which is more convenient ?


ABS is better
• when each hole position is
indicated from a reference
point, programming is made
easy by setting as origin.
INC is better
• when the pitch between the
position of each hole is
indicated.
• when position with the same
pitch is repeated.

Monday, April 20, 2020 Mechanical Engineering Department 75


Rapid Traverse G00
Linear Interpolation
G00
Rapid Traverse ( G00 )
• The cutter moves at a rapid traverse rate
with non-linear or linear interpolation.
• The rapid traverse rate depends on the
machine type.

Cutting Feed ( G01 )


• Command G01 is used to cut
straight lines
• The feed rate is specified
with F in the program

Monday, April 20, 2020 Mechanical Engineering Department 76


Circle Interpolation G02 , G03

Circle Interpolation
• Commands G02, G03 are used to cut circle or
circular arcs. G02 is specified for CW circular
motion.
G03 for CCW circular motion.

Monday, April 20, 2020 Mechanical Engineering Department 77


XY PLANE SELECTION G17
If circular interpolation has to be done in xy plane,
Then G17 is executed XY PLANE.

XY plane

G0/G01 Xa.......... Ya...........(start point)

G17 G02 or G03 Xb............. Yb..........I, J or R


F.......;(End point)

Monday, April 20, 2020 Mechanical Engineering Department 78


XY PLANE SELECTION G17

Monday, April 20, 2020 Mechanical Engineering Department 79


XZ PLANE SELECTION G18
If circular interpolation has to be done in xy
plane,
Then G18 is executed XZ PLANE.

XZ plane

G0/G01 Xa.......... Ya...........(start point)

G18 G02 or G03 Xb............. Yb..........I, J or R F.......;


(End point)
Monday, April 20, 2020 Mechanical Engineering Department 80
XZ PLANE SELECTION G18

Monday, April 20, 2020 Mechanical Engineering Department 81


YZ PLANE SELECTION
G19
If circular interpolation has to be done in xy plane,
Then G19 is executed YZ PLANE.

YZ plane

G0/G01 Xa.......... Ya...........(start point)

G19 G02 or G03 Xb............. Yb..........I, J or R


F.......;(End point)
Monday, April 20, 2020 Mechanical Engineering Department 82
YZ PLANE SELECTION G19

Monday, April 20, 2020 Mechanical Engineering Department 83


SIGN CONVENTION:-

Distance from the start point to the center of the arc.


The arc center is specified by addresses I, J & K for the X,
Y & Z axis respectively. The numerical value following I, J
& K is a Vector Component and is always specified as an
incremental value irrespective of G90 & G91 used

If the tool moves in positive direction while going from


start to center point, then I, J & K will be positive. If the tool
moves in negative direction while going from start to center
point, then I, J & K will be negative

Monday, April 20, 2020 Mechanical Engineering Department 84


SIGN CONVENTION:-

Monday, April 20, 2020 Mechanical Engineering Department 85


Dimension I &J
* Command I & J specify the distance from the start point of circle arc A
to the Center. I & J must be specified incrementally irrespective of ABS
INC mode, adding plus or minus for the direction of I & J
* I & J are the distance of center from the starting point in X & Y direction

Y
B (end point of the arc)
Y
60
A (start point of the arc)
Start 40

X
center J
10
Center End 0,0 10 20 I 50 X J+
I- I+
ABS G90 G03 X20 Y60 I-40 J-
J-30 F100 ;
INC G91 G03 X-30 Y20 I-40
J-30 F100 ;
Monday, April 20, 2020 Mechanical Engineering Department 86
A complete circle
* With I, J & K a complete circle can be programmed by
using one block.
Y+ A

0
R4
B J+
X+
I- I+
J-
From A point From B point
ABS G90 G02 I0 J-40 F100 ABS G90 G02 I-40 J0 F100
INC G91 G02 I0 J-40 F100 INC G91 G02 I-40 J0 F100

Monday, April 20, 2020 Mechanical Engineering Department 87


Specifying radius of circle arc R
* The radius of circle arc can be directly specified by R instead of
specifying the center of circle arc by I, J & K.
* When the center angle of arc is 180 deg or more, the radius R
must be specified with negative (-) sign.
Y
Start

50
B (end point of the arc)
70

R
60 A (start point of the arc)
40
R30 20 End point

0,0 20 50 X 0,0 20 70
G90 G03 X20 Y60 R30 F100 ABS G90 G02 X70 Y20 R-50 F100
G91 G03 X-30 Y20 R30 F100 INC G91 G02 X50 Y-50 R-50 F100

Monday, April 20, 2020 Mechanical Engineering Department 88


Dwell G04

What is ‘dwell’
It is a function to delay the execution of the next
block.
P ______
X _______
Programming format G04

Example G04 P1000 ; MILLI sec


G04 X1000 ; seconds
G04 X1.0 ;
• G04 must be specified by one block by itself
Monday, April 20, 2020 Mechanical Engineering Department 89
INCH/METRIC Conversion

G20 (G70)-Program written in inches

G21 (G71)Program written in millimeters

Monday, April 20, 2020 Mechanical Engineering Department 90


APPLICATION OF INCH/METRIC CONVERSION (OPTIONAL)

Though most of the machining drawings, these


days are in metric systems, we may come across
a few components where the dimensions are to be
controlled in FPS units (i.e., inches). In order to
process these components one has to convert all
the dimensions from inches to mm. which is
laborious,. Even if that is done it becomes very
difficult to co-relate the program to drawing. In
such cases, systems can accept command in
inches if G20 code is input and executed.
Monday, April 20, 2020 Mechanical Engineering Department 91
Feed Function

Feed rate of linear interpolation (G01) &


circular interpolation (G02 & G03) are commanded
with numbers after the F code.

The modes of specifying feed are

1) Feed rate /min (G94)

2) Feed rate/ rev. (G95)


Monday, April 20, 2020 Mechanical Engineering Department 92
Format:

G94:
G01 X____ Y_____ F_____; (F in mm/min)
G95:
G01 X____ Y_____ F______; (F in mm/rev)

Monday, April 20, 2020 Mechanical Engineering Department 93


Example of a part program
O0001
[ BILLET SIZE 110x70x10
[EDGE MOVE X0 Y0 Z0
[TOOL DEF T1 D10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0
N006 M06 T01 (Tool selection)
N007 G90 M03 S2000 ( Spindle CW)
N008 G00 X0 Y0 Z5 (Start Point X & Y Work zero point and 5 mm
above the Z 0 point) {Rapid traverse}
N009 G00 X75 (P1)
N010 M07 (Coolant ON)
N011 G01 Z-10 F150 (Depth of cut)(Linear interpolation and Feed Cmd
N012 G01 X185 (P2) 94
Example of a part program
N013 G01 Y70 (P3)
N014 G01 X145 (P4)
N015 G02 X115 Y70 R15 (P5)
N016 G01 X75 (P6)
N017 G01 Y0 (P1)
N018 G00 Z5 ( 5 mm above the Work zero)
N019 G91 G28 Z0 (Home Position)
N020 G28 X0 Y0
N021 M05 M09 (Spindle off , Coolant off)
N022 M30 (Program Stop and rewind)
Example of a part program
Moving tool from P3 to P4 along a straight line
and from P4 to P5 clockwise along circular arc.
N15 G91 G02 X-28.28 Y0.0 I-14.14 J-5.0
Example of a part program
X and Y specify the end point of the arc (P5) with respect to the
start point (P4).
I and J specify the center of the arc with respect to the start point.

14.14

N015 G91 G02 X-28.28 Y0.0 I-14.14 J-5.0


Mechanical Engineering Department 97
Tool Radius Compensation G41,G42 & G40

 Tool Radius Compensation, rules of G41, G42.

This function is used for side cutting by end mill, from


rough, semi - finish to finishing cutting.

G40 : for Canceling G41,G42.

G41 : Cutter compensation left of work piece

G42 : Cutter compensation right of work piece

Monday, April 20, 2020 Mechanical Engineering Department 98


Follow the cutting feed direction
.

G42
G42 G41
G41 Left G41
G42 Right

G41 G40

G42 Canceling G42


G41

Monday, April 20, 2020 Mechanical Engineering Department 99


Example of a part program
O0001
[ BILLET SIZE 110x70x10
[EDGE MOVE X0 Y0 Z0
[TOOL DEF T1 D10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0
N006 M06 T01 (Tool selection)
N007 M03 S2000 ( Spindle CW)
N008 G90 G42 G00 X0 Y0 Z5 (Start Point X & Y Work zero point and
5 mm above the Z 0 point) {Rapid traverse}
N009 G00 X80 Y5 (P1)
N010 M07 (Coolant ON)
N011 G01 Z-10 F150 (Depth of cut)(Linear interpolation and Feed Cmd
N012 G01 X180 (P2) 100
Example of a part program
N013 G01 Y65 (P3)
N014 G01 X150 (P4)
N015 G02 X120 Y65 R15 (P5)
N016 G01 X80 (P6)
N017 G01 Y5 (P1)
N018 G00 Z5 ( 5 mm above the Work zero)
N019 G40 G91 G28 Z0 (Home Position)
N020 G28 X0 Y0
N021 M05 M09 (Spindle off , Coolant off)
N022 M30 (Program Stop and rewind)
Circular Pocketing
D 50

10
20

Work Zero Point

100

100 Tool Dia 10


Syntax
G170 R P Q X Y Z I J K
G171 P S R F B J

R= Type of surface R0 for flat R1 for irregular


P= Type of finish P0 for Rough, P1 for smooth finish
Q= Peck increment for each pass in mm
X&Y= Co-ordinate of center of the circular pocket in mm
Z= Depth of Pocket in mm
I= Finishing allowance for side.
J= Finishing allowance for pocket base.
K= Radius of the pocket.
P= Percentage of cutter movement for next step
S= Roughing Spindle Speed in RPM
R= Roughing Feed in Z axis
F= Roughing Feed in X & Y axis
B= Finishing Spindle Speed in RPM
J= Finishing Feed
Circular Pocketing
O0001
[ BILLET SIZE 100x100x20
[EDGE MOVE X50 Y50 Z0
[TOOL DEF T1 D10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0
N006 M06 T01 (Tool selection)
N007 M03 S2000 ( Spindle CW)
N008 G90 G00 X0 Y0 Z1
N009 G01 Z0 F150
G170 R0 P1 Q1 X0 Y0 Z-10 I0 J0 K25
G171 P75 S3000 R100 F350 B4000 J80
Circular Pocketing
N018 G00 Z5 ( 5 mm above the Work zero)
N019 G91 G28 Z0 (Home Position)
N020 G28 X0 Y0
N021 M05 M09 (Spindle off , Coolant off)
N022 M30 (Program Stop and rewind)
Rectangular Pocketing
50

10

Work Zero Point

30 100

100 Tool Dia 10


Syntax
G172 I1 J1 K1 R P1 Q X Y Z1
G173 I2 K2 P2 T S R F B J Z2
I1= Length of the Pocket in X direction
J1= Length of the Pocket in Y direction
K1=Corner Radius
R= Absolute depth from the surface
P= Type of finish P0 for Rough, P1 for smooth finish
Q= Peck increment for each pass in mm
X&Y= Pocket corner Co-ordinate in mm
Z= Depth of Pocket in mm
I2= Finishing allowance for side.
k2= Finishing allowance for pocket base.
P= Percentage of cutter movement for next step
T= Tool number
S= Roughing Spindle Speed in RPM
R= Roughing Feed in Z axis
F= Roughing Feed in X & Y axis
B= Finishing Spindle Speed in RPM
J= Finishing Feed
Z2= Safe Z position
Rectangular Pocketing
O0001
[ BILLET SIZE 100x100x20
[EDGE MOVE X0 Y0 Z0
[TOOL DEF T1 D10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0
N006 M06 T01 (Tool selection)
N007 M03 S2000 ( Spindle CW)
N008 G90 G00 X0 Y0 Z1
N009 G01 Z0 F150
G172 I50 J30 K0 R0 P1 Q1 X25 Y35 Z-10
G173 I0 K0 P75 T01 S3000 R100 F350 B4000 J80 Z5
Rectangular Pocketing

N019 G91 G28 Z0 (Home Position)


N020 G28 X0 Y0
N021 M05 M09 (Spindle off , Coolant off)
N022 M30 (Program Stop and rewind)
Canned Cycle
Drilling
Syntax : N000 G81 X___ Y____ Z____ R____ F_____
O0001
[ BILLET SIZE 100x100x15
[EDGE MOVE X0 Y0 Z0
[TOOL DEF T1 D10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0
N006 M06 T01 (Drilling Tool selection Dia 10)
N007 M03 S2000 ( Spindle CW)
N008 G90 G00 X25 Y35 Z5
N009 G81 X25 Y35 Z-18 R2 F200
N010 X55 Y50
N011 X75 Y70
N012 G80 G00 X0 Y0 Z10
N019 G91 G28 Z0 (Home Position)
N020 G28 X0 Y0
N021 M05 M09 (Spindle off , Coolant off)
N022 M30 (Program Stop and rewind)
Deep hole Peck drilling Cycle (G83)
Syntax : N000 G83 X___ Y____ Z____ R____ Q____ F_____

L/D > 10

Boring Cycle (G86)


Syntax : N000 G86 X___ Y____ Z____ R____ F_____

Counter sinking/Counter Boring Cycle (G82)


Syntax : N000 G82 X___ Y____ Z____ R____ F_____
Tapping Cycle (G84)
Tapping Cycle (G84)
Syntax : N000 G84 X___ Y____ Z____ R____ F_____

O0001
[ BILLET SIZE 100x100x20
[EDGE MOVE X0 Y0 Z0
[TOOL DEF T1 D8.6 T2 M10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0
N006 M06 T01 (Drilling tool dia 8.6 Tool selection)
N007 M03 S2000 ( Spindle CW)
N008 G90 G00 X25 Y35 Z5
N009 G81 X25 Y35 Z-18 R2 F200 (Drilling cycle)
N010 X55 Y50
N011 X75 Y70
N012 G80 G00 X0 Y0 Z10
Tapping Cycle

N013 G28 Z0 (Home Position)


N014 G28 X0 Y0
N015 M06 T02 (Tapping Tool selection)
N016 M03 S80 ( Spindle CW)
N017 G84 X25 Y35 Z-18 R5 F80 (Tapping cycle)
N018 X55 Y50
N019 X75 Y70
N020 G80 G00 X0 Y0 Z10
N021 G91 G28 Z0 (Home Position)
N023 G28 X0 Y0
N024 M05 M09 (Spindle off , Coolant off)
N025 M30 (Program Stop and rewind)
Subprogram
Syntax: Subprogram
O0001 (Main Program) O5000
--------- ---------
---------- ----------
---------- ----------
M98 P0015000 (Sub program call, -----------
001= no of times, 5000= sub program name) -----------
------------- -----------
----------- M99 (End of
----------- subprogram
-----------
M05 M09
M30
Mirroring
M70 X mirror On (negate the x values)
M71 Y mirror On (negate the Y values) Billet size X 200 Y 200 Z 20
M80 X mirror Off
50
M81 Y mirror Off
R 25
Work Zero Point

II I

50

III IV
Example for Subprogram and Mirroring
O0001
[ BILLET SIZE 200x200x20
[EDGE MOVE X100 Y100 Z0
[TOOL DEF T1 D10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0
N006 M06 T01 (Tool selection)
N007 M03 S2000 ( Spindle CW)
N008 G90 G00 X0 Y0 Z1
N009 G01 Z0 F150
N010 M98 P0015000 ( I st Circular Pocket)
N011 M70 ( X mirror On)
N012 M98 P0015000 ( II nd Circular Pocket)
N013 M71 ( Y mirror On)
N014 M98 P0015000 ( III rd Circular Pocket)
N015 M80 ( X mirror OFF)
N016 M98 P0015000 (IV th Circular Pocket)
N017 M81 ( Y mirror Off)
N018 G00 Z10
N019 G91 G28 Z0 (Home Position)
N020 G28 X0 Y0
N021 M05 M09 (Spindle off , Coolant off)
N022 M30 (Program Stop and rewind)

Subprogram for Circular pocketing


O5000 (Subprogram Name)
G170 R0 P1 Q1 X50 Y50 Z-10 I0 J0 K25 (Circular Pocketing
code)
G171 P75 S3000 R100 F350 B400 J80
G00 Z5
M99 (End of sub program)
Depth of cut for each pass is 1mm

R5

100
50
50
10

20

50
100
O0001
[ BILLET SIZE 100x100x20
[EDGE MOVE X0 Y0 Z0
[TOOL DEF T1 D10
N001 G71 (metric)
N002 G91 (incremental)
N003 G94 (Feed rate in mm/min
N004 G28 Z0 (Home Position)
N005 G28 X0 Y0 O6000 (Subprogram Name)
N006 M06 T01 (Tool selection) G91 Z-1 (Incremental depth)
N007 M03 S2000 ( Spindle CW) G90 G01 X75
N008 G90 G00 X25 Y25 Z1 G91 Z-1
N009 G01 Z0 F150
N010 M98 P0056000
G90 X25
N018 G00 Z10 M99 (End of sub program)
N019 G91 G28 Z0 (Home Position)
N020 G28 X0 Y0
N021 M05 M09 (Spindle off , Coolant off)
N022 M30 (Program Stop and rewind)
CNC TURNING MACHINE
AXIS IN CNCLATHE

Monday, April 20, 2020 Mechanical Engineering Department 123


Monday, April 20, 2020 Mechanical Engineering Department 124
Monday, April 20, 2020 Mechanical Engineering Department 125
Monday, April 20, 2020 Mechanical Engineering Department 126
DIMENSION SYSTEM
30

P6 P5
20

P4
P3
10

ABSOLUTE DIMENSIONING INCREMENIAL


P2 DIMENSIONING
P1
POINTS X Z POINTS U W
(0,0)
P1 10 0 P1 10 0

P2 10 -10 P2 0 -10

P3 20 -10 P3 10 0

P4 20 -25 P4 0 -15

P5 30 -25 P5 10 0

P6 30 -35 P6 0 -10

30 20 10

Monday, April 20, 2020 Mechanical Engineering Department 127


PREPARATORY FUNCTION (G - FUNCTION)
G codes are instructions describing machine tool movement

G00 Rapid Traverse


G01 Linear Interpolation (cutting feed)
G02 Circular Interpolation (clockwise)
G03 Circular Interpolation (counter clockwise)
G20 Imperial (input in inches)
G21 Metric (input in metric)
G28 Go to Reference Point (Home Position)
G70 Finishing Cycle
G71 Stock Removal in Turning (Multiple Turning Cycle)
G74 Peck Drilling Cycle
G76 Multiple Threading Cycle
G90 Box Turning Cycle
G94 Facing cycle
G98 Feed Per Minute
G99 Feed Per Rev.
MISCELLANEOUS FUNCTIONS (M - CODES)
M Codes are instructions describing miscellaneous functions like calling the tool, spindle rotation,
coolant on/off etc.,

M00 Program Stop


M01 Optional Stop
M02 Program End
M03 Spindle Forward
M04 Spindle Reverse
M05 Spindle Stop
M06 Automatic Tool change
M08 Coolant On
M09 Coolant Off
M10 Vice / Chuck Open
M11 Vice / Chuck Close
M30 Program Stop & Rewind
M38 Door Open
M39 Door Close
M98 Sub program Call
M99 Subprogram Exit
PROGRAM FOR SIMPLE TURNING
R
CODE USED – G01,G00
F R

F
SYNTAX
G00 X (VALUE) Z(Value)
G01 X (VALUE) Z(Value) F(Value)
DRAWING OF THE COMPONENT - SIMPLE TURNING

SIMPLE TURNING

Ø30
Ø27

15.0 50
MACHINE TYPE : FANUC OT G CODES USED - G00,G01
DRAWING NO :1 EXERCISE : 1
MATERIAL : ALUMINIUM BILLET SIZE :Ø30 X 75
ALL DIMENSION IN 'mm' SCALE 1 : 1
MTAB DENFORD TECHNOLOGY CENTER
PROGRAM FOR SIMPLE TURNING
PROGRAM FOR SIMPLE FACING

CODE USED – G01,G00

SYNTAX
G00 X (VALUE) Z(Value)
G01 X (VALUE) Z(Value) F(Value)

F R

F
DRAWING OF THE COMPONENT - SIMPLE FACING

SIMPLE FACING
Ø40

Ø10

MACHINE TYPE : FANUC OT G CODES USED - G00,G01


DRAWING NO :2 EXERCISE : 1
MATERIAL : ALUMINIUM BILLET SIZE :Ø40 X 75
20 5
ALL DIMENSION IN 'mm' SCALE 1 : 1
MTAB DENFORD TECHNOLOGY CENTER
PROGRAM FOR SIMPLE FACING
PROGRAM FOR BOX TURNING

CODE USED – G90

SYNTAX
G90 X (VALUE) Z(Value) F(Value)

TOOL MOVEMENT

R
F

F
DRAWING OF THE COMPONENT – BOX TURNING

TOOL PATH
RAPID TRAVERSE

RAPID TRAVERSE
FEED RATE
PLAIN TURNING CYCLE

Ø10

Ø22
Box Turning

FEED RATE
30

70
PROGRAM FOR BOX TURNING
PROGRAM FOR BOX FACING

CODE USED – G94


SYNTAX

G94 X (VALUE) Z(Value) F(Value)

TOOL MOVEMENT

R
F

F
DRAWING OF THE COMPONENT – BOX FACING

TOOL PATH
RAPID TRAVERSE

RAPID TRAVERSE
FEED RATE
FULL FACING
CYCLE

FEED RATE
PROGRAM FOR BOX FACING
PROGRAM FOR TAPER TURNING
USING G90 CODE
CODE USED – G90
SYNTAX
G90 X (VALUE) Z(Value) R (Value) F(Value)
TAPER TURNING CYCLE R- TAPER TURNING CYCLE
R+
R R
F R
F R F F

CALCULATING R VALUE
R = (Initial dia-final dia) / 2
Dwg.No:06
DRAWING OF THE COMPONENT – TAPER TURNING
G90 - TAPER TURNING R - ve

Ø32
Ø25
15

70
PROGRAM FOR TAPER TURNING

R = (Initial dia-Final dia) / 2


= (25 - 32) /2 = -3.5
DRAWING OF THE COMPONENT – TAPER TURNING

G90 TAPER TURNING R+


PROGRAM FOR TAPER TURNING

R = (Initial dia.-Final dia) / 2


= (32 - 25) /2 = 3.5
EXERCISE ON TAPER TURNING
WRITE A CNC PROGRAM FOR MACHINING THE COMPONENT GIVEN BELOW .

TAPER TURNING
Ø5 Ø8

Ø26 Ø24 Ø20 Ø10

7 8 8 7 10
5 3 5
58
MACHINE TYPE : FANUC OT G CODES USED - G00,G01,G90

DRAWING NO : MIX7190 EXERCISE : TEST3

MATERIAL : ALUMINIUM BILLET SIZE :Ø26 X 75

ALL DIMENSION IN 'mm' SCALE 1 : 1

MTAB DENFORD TECHNOLOGY CENTER


PROGRAM USING MULTIPLE
TURNING CYCLE
CODE USED – G71

SYNTAX
G71 U(Value) R(Value)
G71 P(Value) Q (Value) U (Value) W (Value) F (Value)

U – Depth of cut, in mm
R – Retraction, in mm
P – Starting block, N
Q – End block, N
U - Finishing Allowance in ‘ X ‘ axis, in mm
W - Finishing Allowance in ‘ Z ‘ axis, in mm
F - Feed rate
DRAWING OF THE COMPONENT –MULTIPLE TURNING

Ø22

R5
Ø15
Ø10
R5

5 15 15 10 5

70
PROGRAM FOR MULTIPLE TURNING
EXERCISE ON MULTIPLE TURNING CYCLE
WRITE A CNC PROGRAM FOR MACHINING THE COMPONENT GIVEN BELOW .
EXERCISE ON MULTIPLE TURNING CYCLE
WRITE A CNC PROGRAM FOR MACHINING THE COMPONENT GIVEN BELOW .

Ø20 Ø20
30

25

10

5 7 5 8 10 12 10
EXERCISE ON MULTIPLE TURNING CYCLE
WRITE A CNC PROGRAM FOR MACHINING THE COMPONENT GIVEN BELOW .

2x45

2x45

Ø12
Ø30
Ø25

Ø20
7 5 10 8 5 12 9 10
PROGRAM FOR GROOVING CYCLE

CODE USED – G75


SYNTAX
G75 R
G75 X Z P Q F

R – Retraction, in mm
X – Required Diameter, in mm
Z – Left end point of Groove 1in Z axis, in mm
P – Peck increment in each cut in ‘X’ axis, in micron
Q – Axis stepping distance in ‘Z’ axis, in micron
F – Feed rate
DRAWING OF THE COMPONENT – GROOVING
Dwg.No:13

G75 - GROOVING CYCLE

Ø32
Ø28

5 15

70
PROGRAM FOR GROOVING CYCLE

O1007
G21 G98
G28 U0 W0
M06 T0404 (2MM Groove tool width)
M03 S400
G00 X33 Z-17
G75 R1
G75 X28 Z-20 P200 Q1000 F20
G28 U0 W0
M05
M30
PROGRAM FOR THREADING CYCLE

CODE USED – G76


SYNTAX
G76 P Q R
G76 X Z P Q F

PA(02)B(15)C(60), A-First 2 digit – No of times to call the


finishing cycle
B-Second 2 digit – Pullout angle, in deg
C-Last 2 digit – Thread angle, in deg
Q – depth of cut, in micron
R – Finishing allowance, in mm
X – Minor Diameter, in mm
Z – Thread length, in mm
P – Thread Height, in micron
Q – depth of first cut, in micron
F – Pitch of the thread, in mm
DRAWING OF THE COMPONENT – THREADING CYCLE

DIA25
M12X1.75

15
P= 0.613*Pitch in mm
X= Major diameter - (2*P)
PROGRAM FOR THREADING CYCLE

O1008
G21 G98
G28 U0 W0
M06 T2
M03 S400
G00 X12 Z1
G76 P031560 Q50 R0.1
G76 X9.853 Z-15 P1073 Q100 F1.75
G28 U0 W0
M05
M30
DRAWING OF THE COMPONENT – END FACE PECK
DRILLING CYCLE

D 12
D 32
35
65

Monday, April 20, 2020 Mechanical Engineering Department 160


PROGRAM FOR END FACE PECK DRILLING CYCLE
CODE USED – G74

SYNTAX
G74 R
G74 X Z Q F

R – Return amount, in mm
X- always Zero
Z – Tool depth, in mm
Q – depth of cut for each pass, in micron
F – Feed rate

Monday, April 20, 2020 Mechanical Engineering Department 161


O1008
G21 G98 G28 U0 W0
G28 U0 W0 M06 T3 (drill bit Dia 12)
M06 T1 (Central drill bit) M03 S400
M03 S400 G00 X0
G00 X0 Z2
Z2 G74 R1
G74 R1 G74 X0 Z-5 Q2000 F20
G74 X0 Z-5 Q2000 F20 G28 U0 W0
G28 U0 W0 M05
M06 T2 (drill dia 6 mm) M30
M03 S400
G00 X0
Z2
G74 R1
G74 X0 Z-35 Q2000 F20
Monday, April 20, 2020 Mechanical Engineering Department 162
EXERCISE ON COMBINED CYCLES
WRITE A CNC PROGRAM FOR MACHINING THE COMPONENT GIVEN BELOW .

1X45°

M12X1.75
Ø30

Ø9
Ø25

10 15 5 5 15
EXERCISE ON COMBINED CYCLES
WRITE A CNC PROGRAM FOR MACHINING THE COMPONENT GIVEN BELOW .

Ø10 x1.5
1x45°
Ø25
Ø20

Ø10

Ø7

8 5 10 8 10 3 12
EXERCISE ON COMBINED CYCLES
WRITE A CNC PROGRAM FOR MACHINING THE COMPONENT GIVEN BELOW .

You might also like