You are on page 1of 17

EX.

NO:1 STUDY OF G CODES AND M CODES

Aim:

To study the G codes and M codes for the CNC milling machine.

Programming codes:

Codes are model and do not have to be repeated in every sequence line.
All dimensions are entered as decimals.

G codes for turning machine:

MTAB INDIA PVT LTD

G- To define tool movement for preparatory function.

G OO > Rapid movement


G O1 > Linear movement with feed rate
G 02 > Circular interpretation clockwise with feed rate
G 03 > Circular interpretation counterclockwise with feed rate
G 04 > Dwell time in seconds
G 17 > XY plane
G 18 > XZ plane
G 19 > YZ plane
G 20 > Inch mode input (in)
G 21 > multi mode input (mm)
G 28 > return to reference point (home position)
G 40 > tool nose radius compensation cancel
G 41 > tool nose radius compensation left
G 42 > tool nose radius compensation right
G 70 > finishing cycle
G 71 > multiple turning cycle
G 72 > multiple facing cycle
G 74 > deck drilling cycle in z axis
G 75 > grooving cycle in z axis
G 76 > thread cutting cycle
G 90 > turning cycle
G 92 > thread cutting cycle
G 94 > facing cycle
G 98 > feed per minute
G 99 > feed per revolution

M- Codes / Miscellaneous codes:

M 00 > program stop


M 01 > optional stop
M 02 > program end

1 | Page
03 > spindle forward (cw) M 04
> spindle reverse ( ccw) M 05 >
spindle stop
M 06 > tool change
M 08 > coolant ON M
09 > coolant OFF M 10
> chuck open M 11 >
chuck close
M 30 > program stop and restart
M 98 > sub program call
M 99 > sub program exit

G- CODES FOR MILLING MACHINES:

HYTECH CNC MACHINE,PUNE

G 00 > point to point rapid positioning


G 01 > linear interpretation
G 02 > Circular interpretation arc clockwise
G 03 > Circular interpretation arc counterclockwise
G 04 > Dwell time in seconds
G 12 > circular pocketing clockwise
G 13 > circular pocketing anticlockwise
G 15 > polar coordinate system OFF G
16 > polar coordinate system ON
G 17 > XY plane selection for arc movement
G 18 > XZ plane selection for arc movement
G 19 > YZ plane selection for arc movement
G 20 > selecting inch mode input
G 21 > selecting metric mode input
G 40 > cutter compensation/offset, cancel
G 41 > cutter radius compensation / offset-left
G 42 > cutter radius compensation / offset-right
G 43 > tool length compensation -positive
G 44 > tool length compensation -negative
G 49 > tool length compensation -cancel
G 50 > scaling mode cancel (OFF)
G 51 > scaling mode ON
G 54 > shift of coordinate
G 55 > shift of coordinate
G 56 > shift of coordinate
G 57 > shift of coordinate
G 58 > shift of coordinate
G 59 > shift of coordinate
G 68 > coordinate rotation system ON
G 69 > coordinate rotation system ON
G 70 > Inch programming
G 71 > metric programming
G 80 > drilling cycle
G 81 > fixed cycle no 1 drill, spot drill
G 82 > fixed cycle no 2 drill, counter bore
G 83 > fixed cycle no 3 drill, deep hole

G 84 > tapping cycle


G 85 > fixed cycle no 4 drill, bore
G 86 > boring cycle
G 87 > back boring cycle
G 88 > boring cycle
G 89 > boring cycle
G 90 > absolute dimension input
G 91 > incremental dimension input
G 94 > feed rate selection per min
G 95 > feed rate selection per minute
G 98, 99 > tool return position
G 28 > return to reference point (home position) G
40 > tool nose radius compensation cancel
G 41 > tool nose radius compensation left
G 42 > tool nose radius compensation right
G 70 > finishing cycle
G 71 > multiple turning cycle
G 72 > multiple facing cycle
G 74 > peck drilling cycle in z axis
G 75 > grooving cycle in z axis
G 76 > thread cutting cycle
G 90 > turning cycle
G 92 > thread cutting cycle
G 94 > facing cycle
G 98 > feed per minute
G 99 > feed per revolution

M- Codes / Miscellaneous codes:

M 00 > program stop


M 01 > optional program stop
M 02 > program end
M 03 > spindle motor ON and forward direction (cw) M
04 > spindle motor ON and reverse direction ( ccw)
M 05 > spindle stop
M 06 > automatic tool change
M 08 > coolant pump motor ON M
09 > coolant pump motor OFF M 21
> mirror image along x axis M 22 >
mirror image along y axis M 23 >
mirror image along z axis M 30 >
program stop and restart M 98 > sub
program call
M 99 > sub program exit

RESULT

Thus the G codes and M codes for the CNC milling machines were studied.
EX.NO:2 CNC-MILLING RECTANGULAR POCKETING

DATE:

Aim:

To perform a rectangular milling operation by using CNC milling programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software

Program:

M 03 S 1500
(Stock /block 100,100, 10, -4, -4,
-7) (tool /mill 10, 0, 30, 0)
(color 0, 255,
0) G21 G98
G00 X0 Y0 Z5
G00 X10 Y10 Z5 F120
G01 X60 Y10 Z-3 F120
G01 X60 Y60 Z-3 F120
G01 X10 Y60 Z-3 F120
G01 X10 Y10 Z-3 F120
G00 X0 Y0 Z5
M05 M30

RESULT:
Thus the rectangular milling operations by using CNC milling programming codes were
performed.
EX.NO:3 CNC-MILLING CIRCULAR POCKETING

DATE:

Aim:

To write a manual part program for performing a circular pocketing milling operation by using
CNC milling programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software
Work piece (100 x100 x 10 mm)

Program:

(Stock /block 100,100, 10, 15,


10) (tool /mill 5, 0, 50, 0)
(color 255,255,
255) G21 G98
M05 S1500
G00 X0 Y0 Z5
G00 X50 Y50 Z5
G01 X50 Y50 Z-2 F50
G02 I5 F50
G02 I9 F50
G02 I12 F50
G00 X50 Y50 Z5
G00 X0 Y0 Z5
M05
M30

RESULT:
Thus the circular milling operations by using CNC milling programming codes were performed.
EX.NO:4 CNC LATHE-SIMPLE TURNING

DATE:

Aim:

To perform the simple turning operation by using CNC programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software
Cutting tool
Work piece

Program:

Billet X32 Z70


G21 G98
G28 U0 W0
M06 T02
M03 S1000
G00 X32 Z3
G90 X31 Z-28 F100
X30
X29
X28
G28 U0 W0
M05
M30

RESULT:
Thus the simple turning operation was performed by using CNC Lathe programming codes.
EX.NO:5 CNC LATHE-STEP TURNING

DATE:

Aim:

To perform the step turning operation by using CNC programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software
Cutting tool
Work piece

Program:

Billet X32 Z70


G21 G98
G28 U0 W0
M06 T01
M03 S1500
G00 X32 Z5
G90 X31 z-30
X30 Z-25
X28 Z-20
X24 Z-15
G28 U0 W0
M05
M30

RESULT:
Thus the step turning operation was performed by using CNC Lathe programming codes.
EX.NO:6 CNC LATHE SIMPLE FACING

DATE:

Aim:

To perform a simple facing operation by using CNC programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software
Cutting tool
Work piece

Program:

Billet X32 Z70


G21 G98
G28 U0 W0
M06 T01
M03 S1500
G00 X32 Z0
G94 X0 Z-1 F100
Z-2
Z-3
G28 U0 W0
M05
M30

RESULT:
Thus the Simple facing operation was performed by using CNC Lathe programming codes.
EX.NO:7 CNC LATHE RIGHT HAND TAPER TURNING

DATE:

Aim:

To perform the right hand taper turning operation by using CNC programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software
Cutting tool
Work piece

Program:

Billet X32 Z70


G21 G98
G28 U0 W0
M06 T01
M03 S1500
G00 X32 Z5
G90 X30 Z-30 R-1 F50
R-2
R-3
G28 U0 W0
M05
M30

RESULT:
Thus the right hand taper turning operation was performed by using CNC Lathe programming
codes.
EX.NO:8 CNC LATHE LEFT HAND TAPER TURNING

DATE:

Aim:

To perform the left hand taper turning operation by using CNC programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software
Cutting tool
Work piece

Program:

Billet X32 Z70


G21 G98
G28 U0 W0
M06 T01
M03 S1500
G00 X32 Z5
G90 X30 Z-30 R-1 F50
X28 R2
X26 R3
G28 U0 W0
M05
M30

RESULT:
Thus the left hand taper turning operation was performed by using CNC Lathe programming
codes.
EX.NO:9 CNC LATHE THREAD CUTTING OPERATION

DATE:

Aim:

To perform thread cutting operation by using CNC programming codes.

Apparatus required:

CNC machine
Personal computer
CNC software
Cutting tool
Work piece

Program:

Billet X32 Z70


G21 G99
G28 U0 W0
M06 T02
M03 S1500
G00 X32 Z5
G94 X31 Z45 F1.5
X30.5
X30
G00 X29.3 Z2
G76 P1 Q12 R0.7 F0.5
G76 X28.05 Z40 P12 Q12 F0.5
X28.6 R1.4
X28 R1.95
G28 U0 W0
M05
M30

RESULT:
Thus the thread cutting operation was performed by using CNC Lathe programming codes.