You are on page 1of 19

Zero Points and Reference Points:

G CODES
G00
G01
G02
G03
G04
G09
G20
G21
G28
G40
G41
G42
G50
G70
G71
G72
G73
G74
G75
G76
G80
G81
G82
G83
G84
G85
G90
G92
G94
G96
G97
G98
G99

DESCRIPTION
Rapid positioning
Linear interpolation
Circular interpolation(CW)
Circular interpolation(CCW)
Dwell
Exact stop
Inch input
Metric input
Machine home position
Tool nose compensation cancel
Tool nose compensation left
Tool nose compensation right
Max spindle speed setting
Finishing cycle
O.D/I.D Stock removal cycle
End face stock removal cycle
Irregular path stock removal cycle
Eng face grooving cycle
O.D/I.D Stock grooving cycle
Threading cycle, multiple pass
Canned cycle cancel
Drill canned cycle
Spot drill canned cycle
Normal peck drill canned cycle
Tapping canned cycle
Boring canned cycle
O.D/I.D Turning cycle model
Threading cycle
End face cycle
Constant surface speed command
Constant RPM
Feed per minute
Feed per revolution

Miscellaneous Functions:
M codes used to establish requirement other than those related
to slide movement. For example they are used to active spindle motion
(or) to turn on a coolant supply etc.
M CODES

DESCRIPTION

M00
M01
M02
M03
M04

Temporary program stop


Optional stop
Program end
Spindle clock wise rotation
Spindle counter clock wise

M05
M06
M08
M09
M10
M17
M18
M19
M20
M30
M98
M99

rotation
Spindle stop
Automatic toll changes
Coolant pump on
Coolant pump of
Chuck clamp
Turret rotation always forward
Turret rotation always reverse
Spindle orient
Spindle orient release
Program end and rewinding
Subprogram cell
Subprogram end

G94 STEP FACING CYCLE

FACING CYCLE

ALL DIMENSIONS ARE IN MM

O User defined tool entry point


R Rapid traverse (M/c Value)
F User defined feed rate

G94 STEP FACING CYCLE


MATERIAL REQUIRED:
Aluminium Rod
25 mm * 60 mm Length
PROGRAM:
G21 G98
G28 U0

W0

M06 T0202
M03 S1500
G00 X26

Z2

G94 X0 Z-1 F0.5


Z-2;
Z-3;
Z-4;
Z-5;
G28 U0
M05
M30

W0;

G90 PLAIN BOX TURNING

TURNING CYCLE

ALL DIMENSIONS ARE IN MM

O User defined tool entry point


R Rapid traverse (M/c Value)
F User defined feed rate

G90 PLAIN BOX TURNING


MATERIAL REQUIRED:
Aluminium Rod
25 mm * 60 mm Length
PROGRAM:
G21 G98
G28 U0

W0

M06 T0101
M03 S1500
G00 X26

Z2

G90 X24

Z-40 F0.1

X23
X22
X21
X20
G28 U0
M05
M30

W0

G90 STEP TURNING

FACING CYCLE

ALL DIMENSIONS ARE IN MM

O User defined tool entry point


R Rapid traverse (M/c Value)
F User defined feed rate

G90 STEP TURNING


MATERIAL REQUIRED:
Aluminium Rod
25 mm * 60 mm Length
PROGRAM:
G21 G98
G28 U0

W0

M06 T0101
M03 S1500
G00 X26

Z2

G90 X24

Z-40 F0.1

X23
X22

Z-20

X21
X20
G28 U0
M05
M30

W0

G90 TAPER TURNING CYCLE

TAPER TURNING CYCLE

ALL DIMENSIONS ARE IN MM

O User defined tool entry point


R Rapid traverse (M/c Value)
F User defined feed rate

G90 TAPER TURNING CYCLE


MATERIAL REQUIRED:
Aluminium Rod
25 mm * 60 mm Length
PROGRAM:
G21 G98
G28 U0

W0

M06 T0101
M03 S1500
G00 X25

Z2

G90 X25

Z-40 R-1

R-2
R-3
R-4
R-5
G28 U0
M05
M30

W0

F0.1

G71 MULTIPLE TURNING

TURNING CYCLE

ALL DIMENSIONS ARE IN MM

O User defined tool entry point


R Rapid traverse (M/c Value)
F User defined feed rate

G71 MULTIPLE TURNING


MATERIAL REQUIRED:
Aluminium Rod
25 mm * 60 mm Length
G71 MULTIPLE TURNING FORMAT:
G71 U1

R0.5

G71 P10

Q20 U0.25W0.25

F0.1

First line
Specifies a depth of cut of 1mm and the
escape of 0.5mm.
Second line P, Q specifies block numbers at the start and
end of the profile.
U & W specify the distance and direction of the
finishing allowance on X and Y-axes.
F specifies the feed rate.
PROGRAM:
G21
G98
G28 U0 W0
M06 T0101
M03 S1500
G00 X26 Z2
G71 U0.5 R0.5
G71 P90

Q150 U0.25W0.15

F0.1

N90 G01 X0;


N100

Z0;

N110 G03 X10

Z-5

R5

F0.25;

N120 G01 Z-15 F0.75;


N130 X20

Z-20;

N140 Z-30
N150 G02 X25

Z-35 R5

N160 G70 P90

Q150 F0.01;

N170 G28 U0

W0;

M05
N180M30

F0.25;

G92 SINGLE PASS THREADING


CYCLE
MAJOR DIA = 16
CORE DIA

13.5462
PITCH

= 2.00

TH. HEIGHT =
1.2269
TIP ANGLE = 60

BOX THREADING
CYCLE
ALL DIMENSIONS ARE IN MM

O User defined tool entry point


R Rapid traverse (M/c Value)
F User defined feed rate

G92 SINGLE PASS THREADING CYCLE


MATERIAL REQUIRED:
Aluminium Rod
25 mm * 60 mm Length
G92 BOX THREADING FORMAT:
G92 X25

Z-32 F2

X24.5
X24
specifies the end
PROGRAM:

F Specifies pitch value in mm and X, Z


position of the thread.

G21 G98
G28 U0
W0
N30 M06 T0101
N40 M03 S1500
N60 G00 X26 Z2;
N70 G71 U0.5 R0.5;
N80 G71 P90 Q150 U0.25W0.15
N90 G01 X13;
N100 Z0;
N110 G01 X16 Z1.5 F0.5;
N120
Z-37.5;
N130
X20;
N140
Z-45;
N150
X25;
N160 G70 P90 Q150 F0.01;
N170 G28 U0
W0;
N180 M06 T0202
M03 S600
N200 G00 X17 Z-34;
N210 G01 X12 F2;
N220
X18;
N230 G28 U0
W0;
N240 M06 T0404
N250 M03 S600
N260 G00 X16 Z3
N270 G92 U15.7W-32.5 F1.5
N280 U15.4
N290 U15.1
N300 U14.8
N310 U14.5
N320 U14.2
N330 U13.9
N340 U13.5462

F0.1;

N350 G28 U0

W0;

M05
N360M30
PECK DRILLING CYCLE
G21
G98
G28 U0 W0
M06 T0101
M03 S1000
G00 X0 Z3
G74 R1
G74 X0 Z-30 Q5000 R0.5 F100
G28 U0 W0
M06 T0202
M03 S1000
G00 X0
Z3
G74 R1
G74 X0 Z-15 Q5000 R0.5 F100
G28 U0 W0
M05
M30

CONTOUR MILLING

CONTOUR MILLING
G21 G98

G91
G28 X0 Y0 Z0
M06 T1
M03 S1200
G90
G00 X0 Y0 Z5
G01 X-25 Y-35 Z-2 F50
G01 X-10 Y-35
G02 X10 Y-35 R10
G01 X25 Y-35
G02 X35 Y-25 R10
G01 X35 Y-10
G01 X25 Y-5
G01 X25 Y5
G01 X35 Y10
G01 X35 Y25
G02 X25 Y35 R10
G01 X10 Y35
G02 X-10 Y35 R10
G01 X-25 Y35
G02 X-35 Y25 R10
G01 X-35 Y10
G01 X-25 Y5
G01 X-25 Y-5
G01 X-35 Y-10
G01 X-35 Y-25
G02 X-25 Y-35 R10
G00 Z5
G91
G28 X0 Y0 Z0
M05
M30

MIRRORING

Ex. No. 11

MIRRORING

Date:
AIM :
To write a part program and perform the machining operation in the
CNC XL MILL milling machine to create the required profile
PROCEDURE :
Move the tool to the home position.
Select the appropriate tool for machining and the spindle speed.
Feed is in mm/min.
The program follows the absolute mode of tool positioning.
The input is in metric units.
The part program is written and executed.
Then the required profile is obtained.
G21 G98
G91

G28 X0 Y0 Z0
M06 T01
M03 S1200
G90
G00 X15 Y0 Z5
M98 P0015555
M70
M98 P0015555
M71
M98 P0015555
M80
M98 P0015555
M81
G90
G00 Z5
G91
G28 X0 Y0 Z0
M30
Sub Program
O5555
G90
G00 X15 Y10
G01 Z-2 F100
G01 X25 Y25
G01 X35 Y10
G01 X15 Y10
G90
G00 X0 Y0 Z5
M99

DRILLING

20

20

20
10
15

15

30

G21 G98
G91
G28 X0 Y0 Z0
M06 T3
M03 S1200
G90
G00 X0 Y0 Z5
G83 X-30 Y-15 Z-10 Q3 R2 F50
X-20 Y10
X30 Y20
X20 Y-15
G80
G90
G00 Z5
M30

2
0

You might also like