4 CNC Lathe
4 CNC Lathe
4 CNC Lathe
CONTENTS
1. Introduction to CNC
2. Operations and Capabilities
3. CNC Lathe Programmable Axes
4. CNC Lathe Programming
5. CNC Lathe Programming Example
2
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
1. INTRODUCTION
Every CNC machine tool is designed to position the workpiece and cutting
tools to perform cutting operations.
Each machine has a definite three dimensional volume of space in which
tools and workpieces may be moved about and positioned.
On CNC lathe machines, the spindle axis is Z and the cross slide is X (figure
below).
9
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
11
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
12
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
Commands
G-Code CONTENTS
G00 Positioning
G01 Straight line cutting
G02 Circular cutting (clockwise)
G-Code CONTENTS
G04 Dwell
G40 Tool nose radius composition: Cancel
G41 Tool nose radius composition: left
G42 Tool nose radius composition: right
G50 Maximum Spindle speed designation
G71 Longitudinal compound fixed thread cutting cycle
G73 Longitudinal grooving compound fixed cycle
G74 Transverse grooving/drilling compound fixed cycle
G77/G78 Tapping compound fixed cycle
G80 End of shape designation (LAP)
G81 Start of longitudinal shape designation (LAP)
G82 Start of transverse shape designation (LAP)
G85 Call of rough bar turning cycle (LAP)
G87 Call of finish turning cycle (LAP)
G90 Absolute programming
14
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
G-Code CONTENTS
G91 Incremental programming
G94 Feed per minute mode (mm/min)
G95 Feed per revolution mode (mm/min)
G96 Constant speed cutting ON
G97 Cancel of G96 (direct spindle speed)
M-code CONTENTS
M00 Program stop
M01 Optional stop
M02 End of program
M03 Spindle clockwise rotation
M04 Spindle counterclockwise rotation
M05 Spindle stop
M08 Coolant on
M09 Coolant off
M41 Low gear
15 M42 High speed gear
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
Coordinates
In order to let the machine know where it should move the tool, the
coordinate point have to be specified. The coordinate value is represented
by X, Z, A, C, I and K-axis. However, only X and Z-axis is being concerned
in this class.
X±_____.___ Z ±_____.___
In default parameter setting, the unit system is in millimeters
X90.1 is effectively 90.1 mm or 90100μm
Also by default, the unit system allow 3 significant digits after the decimal
point. X0.001
Decimal point is not essential if integer value is assigned.
X90 is effective as X90. or X90.0
Example: X -70.711 Z100
X 90.001 Z90
16
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
17
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
Tool Selection
19
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
Example:
T0101
S2000 M03
G00 X188 Z204
X188
G01 X185 Z120 F0.5
X190
Z100
X200
G00 X300 Z300
M5 (Spindle stop)
M2 (End of program)
M08 Coolant On
M09 Coolant Off
Example:
T0101
S2000 M03
G00 X188 Z204
X185
M08
G01 X185 Z120 F0.5
X190
Z100
X200
G00 X300 Z300
M5
M09
21 M2
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
M00 Program Stop. The machining cycle stops when this code is
encountered during program execution. Pressing CYCLE START at this
point will resume the operation.
M01 Optional Stop. M01 performs the same functions as M00, except,
it is only effective when the OPTIONAL STOP button on the control
panel is switched on. Pressing CYCLE START at this point will be resume
the operation.
M02 End of program. It must be included to indicate end of a
program. This code also resets the control.
Example:
T01 01 01
S2000 M03
G00 X188 Z204
X185
M00 (Operation cycle stop here)
M08 (Operation cycle continues here when CYCLE START button is
22 pressed)
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
23
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
Positioning (G00)
24
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
This code commands the machine to move the cutter from current
position to the position specified by X and Z. Along a straight line a
feed rate specified by F.
G01 X_ _ _ _ . _ _ _ Z _ _ _ _ . _ _ _ F_ . _ _ _
Example straight line cutting
T0101
S2000 M03
G00 X188 Z204
X185
M08
G01 X185 Z120 F0.5
X190
Z100
X200
G00 X300 Z300
M5
M09
25 M2
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
4. CNC PROGRAMMING –(cont’d)
26
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
5. PROGRAMMING EXAMPLE
* Refer to handout
27
FAKULTI KEJURUTERAAN MEKANIKAL
UNIVERSITI TEKNIKAL MALAYSIA MELAKA
THE END
THANK YOU
28