CNC Milling
CNC Milling
ME 110:Workshop Practice-I
Stepper Motor
Special type of synchronous motor which is designed to rotate
through a specific angle (called step) for each electrical pulse
received from the control unit.
Coordinate systems
The machine tool uses Cartesian coordinate system. First
identify the z-axis, x- and y- axes will then follow using the
Right hand coordinate system.
Coordinate systems contd.
Servo Controller
Counter Comparator
Define Tool
CNC data
Make 3D model
Simulate
cutting
CNC programming
Important things to know:
• Coordinate System
• Units, incremental or absolute positioning
• Coordinates: X,Y,Z, RX,RY,RZ
• Feed rate and spindle speed
• Coolant Control: On/Off, Flood, Mist
• Tool Control: Tool and tool parameters
Programming consists of a series of instructions in form of letter codes
• Preparatory Codes:
G codes- Initial machining setup and establishing operating conditions
N codes- specify program line number to executed by the MCU
• Axis Codes: X,Y,Z - Used to specify motion of the slide along X, Y, Z
direction
• Feed and Speed Codes: F and S- Specify feed and spindle speed
• Tool codes: T – specify tool number
• Miscellaneous codes – M codes For coolant control and other
activities
Programming Key Letters
• O - Program number (Used for program identification)
• N - Sequence number (Used for line identification)
• G - Preparatory function
• X - X axis designation
• Y - Y axis designation
• Z - Z axis designation
• R - Radius designation
• F – Feed rate designation
• S - Spindle speed designation
• H - Tool length offset designation
• T - Tool Designation
• M - Miscellaneous function
Important G (Preparatory) codes
• G00 Rapid Transverse G00 Rapid move G0 X# Y# Z# up to
• G01 Linear Interpolation 6 axis or G0 Z# X#
G01 Linear feedrate move G1 X# Y#
• G02 Circular Interpolation, CW Z# up to 6 axis or G1 Z# X#
• G03 Circular Interpolation, CCW G02 Clockwise move
• G15 Polar Coordinate System off G03 Counter clockwise move
• G16 Polar Coordinate System on G04 Dwell time
G08 Spline smoothing on, optional L#
• G17 XY Plane,G18 XZ Plane,G19 YZ Plane number of blocks to buffer
• G20/G70 Inch units G09 Exact stop check, spline
• G21/G71 Metric Units smoothing Off
• G28 Return to Reference Point G10 Linear feedrate move with
decelerated stop
• G40 Cutter compensation cancel G11 Controlled Decel stop
• G41 Cutter compensation left G17 X Y Plane
• G42 Cutter compensation right G18 X Z Plane
• G43 Tool length compensation (plus) G19 Y Z Plane
G28 move to position relative to
• G44 Tool length compensation (minus) machine zero
• G49 Tool length compensation cancel G53 Cancel fixture coordinate offsets
• G51.1 - X0 X Mirror on G54-G59 fixture coordinate offsets 1
• G50.1 - X0 X Mirror off through 6
Important G (Preparatory) codes Contd.
G70 Inch mode
• G51.1 - Y0 Y Mirror on G71 Millimeter mode
• G50.1 - Y0 Y Mirror off G80 Cancels canned cycles
• G53 Work Coordinate System off and modal cycles
• G54 …..G59 Work Coordinate System 1…6 G81 Drill cycle
G82 Dwell cycle
• G68 Rotation on G83 Peck cycle
• G69 Rotation off G84 Tapping cycle
• G73 Peck Drilling Cycle G85 Boring cycle 1 bore
• G80 Cancel canned cycles down, feed out
G86 Boring cycle 2 bore
• G81 Drilling cycle down, dwell, feed out
• G82 Counter boring cycle G88 Boring cycle 3 bore
• G83 Deep hole drilling cycle down, spindle stop, dwell,
• G90 Absolute positioning feed out
G89 Boring cycle 4 bore
• G91 Incremental positioning down, spindle stop, dwell,
• G94 Feed per Minute rapid out
• G95 Feed per Revolution G90 Absolute mode
• G98 Return to Reference point in Drilling Operation G91 Incremental mode
G92 Home coordinate reset
• G99 Return to Initial point in Drilling Operation G93 cancel home offsets
G98 - G199 User-definable G
codes
Important M (Functional) codes
• M00 Program stop
• M01 Optional program stop
• M02 Program end
• M03 Spindle on clockwise
• M04 Spindle on counterclockwise
• M05 Spindle stop
• M06 Tool change
• M08 Coolant on
• M09 Coolant off
• M10 Clamps on
• M11 Clamps off
• M13 Spindle CW and Coolant On
• M14 Spindle CCW and Coolant On
• M30 Program stop, reset to start
• M98 Sub-Program Call
• M99 Sub-Program Exit
Profile Milling Example
• G15 G17 G94 G21 G40 G69 G80
• G91 G28 Z0
• G28 X0 Y0
• M06 T1
• M03 S1200
• G90 G00 G54 X-30 Y-20
• G43 H1 Z10
• M08
• G01 Z-1 F120
• G01 Y20
• G02 X-20 Y30 R10
• G01 X20
• G03 X30 Y20 R10
• G01 Y-20
• G01 X20 Y-30
• G01 X-20
• G03 X-30 Y-20 R10
• G00 Z5
• M09
• G91 G28 Z0
• G28 X0 Y0
• M05
• M30