offset & facing
offset & facing
Experiment 02
CNC Milling
Objectives:
• To write the G & M codes for offset and facing operations and perform the
operations on the CNC Milling.
• CNC Turning
• CNC milling
• CNC wirecut
• CNC router
• CNC laser cut
• CNC water jet cutting etc.
C) Machine
A) Instructions B) Controller
Component
G & M codes
Generally, G-codes create movement & M-codes turn things ON, turn things OFF.
1
Department of Mechanical Engineering, Air University A&AC Kamra
Manufacturing Processes-II Lab
Addresses
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
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:
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.
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
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.
5
Department of Mechanical Engineering, Air University A&AC Kamra