0% found this document useful (0 votes)
12 views

offset & facing

lab experiment

Uploaded by

M javed Iqbal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views

offset & facing

lab experiment

Uploaded by

M javed Iqbal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Manufacturing Processes-II Lab

Experiment 02
CNC Milling

Objectives:

• To write the G & M codes for offset and facing operations and perform the
operations on the CNC Milling.

Types of CNC machines

• CNC Turning
• CNC milling
• CNC wirecut
• CNC router
• CNC laser cut
• CNC water jet cutting etc.

Working on CNC Machine/ EDM wirecut

C) Machine
A) Instructions B) Controller
Component

A) Instructions to machine: (based on the available facilities in Labs)

Machine Form of instruction

EDM wirecut 2D cad drawings using AutoCAD software


CNC lathe Writing G & M codes manually
CNC milling Generating G & M codes using Fusion 360 software

G & M codes
Generally, G-codes create movement & M-codes turn things ON, turn things OFF.

Recommended order of Addresses in a block

N… G… X (or U)… Z (or W)… F… S… T… D… M… H…

1
Department of Mechanical Engineering, Air University A&AC Kamra
Manufacturing Processes-II Lab

Addresses

N Refers to block number / sequence


G G-codes
X Absolute distance traveled by tool in x-axis
U Incremental distance traveled by tool in x-axis
Z Absolute distance traveled by tool in z-axis
W Incremental distance traveled by tool in z-axis
F Feed rate
S Spindle speed
T Tooling management
M M-codes

G-codes (Preparatory functions)

G Code Description
G00 Positioning (rapid traverse)
G01 Linear interpolation
G02 Circular interpolation clockwise
G03 Circular interpolation counterclockwise
G04 Dwell
G17 Plane XY
G18 Plane XZ
G19 Plane YZ
G20 Dimensions in inches
G21 Dimensions in mm
G28 Automatic machine reference
G40 Cancel cutter radius compensation
G41 Cutter radius compensation left
G42 Cutter radius compensation right
G80 Deselection of drilling cycles
G90 Absolute programming
G91 Incremental programming
G92 Spindle speed limit

2
Department of Mechanical Engineering, Air University A&AC Kamra
Manufacturing Processes-II Lab

G98 Feed per minute


G99 Feed per revolution
G96 Constant cutting speed, feed per revolution
G97 Constant spindle speed

M-codes (Miscellaneous functions)

M
Code Description
M00 Programmed stop
M01 Optional stop
M02 Main program end
M03 Spindle rotation clockwise
M04 Spindle rotation counterclockwise
M05 Spindle stop
M06 Tool change
M08 Coolant ON
M09 Coolant OFF
M10 Chuck open
M11 Chuck close
M19 Spindle lock
M20 Spindle unlock
M30 Main program end

Lab Task (Write a program to change the cutting tool and perform facing operation on
workpiece on CNC Milling machine):

CODE:

G54 G40 G17 G90;

G00 Z50;

T1 D1;

G95 F0.9;

3
Department of Mechanical Engineering, Air University A&AC Kamra
Manufacturing Processes-II Lab

M03 S1000;

G00 X0 Y0;

Z05;

G01 Z-0.5;

Y70;

X7;

Y0;

Y70;

X21;

Y0;

Z00;

Z20;

M30;

Offset:

Offset: In a CNC milling machine, "offset" refers to the adjustments made to align the
cutting tool and workpiece accurately. These offsets ensure that the cutting operation
is performed precisely according to the desired part dimensions.

There are two main types of offsets in CNC lathes:

1. Tool Offset: This offset compensates for the differences between the physical tool
and the programmed tool dimensions in the machine. Each tool has a unique length
and diameter, and these variations are managed with tool offsets to achieve precision.
• Geometry Offset: Accounts for the length and size of the tool.

2. Work Offset (Part Zero Offset): This sets the origin point (zero position) of the
workpiece. Since the raw material isn’t always perfectly aligned with the machine’s
default origin, the work offset aligns the program's coordinate system with the actual
position of the workpiece. • Common Offsets: G54, G55, etc., specify different work
coordinate systems.

4
Department of Mechanical Engineering, Air University A&AC Kamra
Manufacturing Processes-II Lab

Procedure: (Facing Operation)

• Select and securely clamp the workpiece on the machine's table.


• Choose the appropriate cutting tool (Tool 1 in this case) for the facing operation.
• Insert Tool 1 into the machine spindle.
• Set the workpiece coordinate system (G54) and zero the machine at the starting
point (X0, Y0, Z0). Use T1 D1 to select the tool and set the tool compensation.
• Define the feed rate (G95 F0.9) and spindle speed (M03 S1000).
• Rapidly move the tool to a safe height with G00 Z50. Position the tool at the
starting point with G00 X0 Y0.
• Lower the tool to the cutting depth with G01 Z-0.5. Move the tool along the Y-
axis to Y70, and then across the X-axis to X7.
• Return the tool to Y0 and perform another pass by moving to Y70 and then to
X21.Move the tool back to Y0.
• Retract the tool to a safe height with Z00 and Z20.Use M30 to stop the spindle
and end the program.

Conclusion:

This CNC program performs a basic facing operation on a workpiece, moving the
cutting tool in straight lines in the XY plane. The tool moves to a safe position in Z
before starting, then makes small linear cuts, ensuring proper feed rate and spindle
speed. The program ends by moving the tool back to its safe Z position and
terminating.

Photograph of the product/part manufactured in Lab:

5
Department of Mechanical Engineering, Air University A&AC Kamra

You might also like