What is a CNC
CNC : Computer and Numeric Control
Conventionally, an operator decides and
adjusts various machines parameters
like feed , depth of cut etc depending on
type of job , and controls the slide
movements by hand. In a CNC Machine
functions and slide movements are
controlled by motors using computer
programs.
How CNC Works
•Controlled by G and M codes.
•These are number values and co-ordinates.
•Each number or code is assigned to a particular
operation.
•Typed in manually to CAD by machine operators.
•G&M codes are automatically generated by the
computer software..
Tool Paths, Cutting
and Plotting Motions
•Tool paths describes the route the cutting tool takes.
•Motion can be described as point to point, straight
cutting or contouring.
•Speeds are the rate at which the tool operates e.g. rpm.
•Feeds are the rate at which the cutting tool and work
piece move in relation to each other.
•Feeds and speeds are determined by cutting depth,
material and quality of finish needed. e.g. harder
materials need slower feeds and speeds.
•Rouging cuts remove larger amounts of material than
finishing cuts.
•Rapid traversing allows the tool or work piece to move
rapidly when no machining is taking place.
CNC Programming Basics
•CNC instructions are called part program commands.
•When running, a part program is interpreted one
command line at a time until all lines are completed.
•Commands, which are also referred to as blocks, are
made up of words which each begin with a letter address
and end with a numerical value.
CNC Programming Basics
•Each letter address relates to a specific machine
function. “G” and “M” letter addresses are two of the
most common. A “G” letter specifies certain machine
preparations such as inch or metric modes, or absolutes
versus incremental modes.
•A “M” letter specifies miscellaneous machine functions
and work like on/off switches for coolant flow, tool
changing, or spindle rotation. Other letter addresses are
used to direct a wide variety of other machine
commands.
CNC programming
•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
Z - Z axis designation
R - Radius designation
F – Feed rate designation
S - Spindle speed designation
H - Tool length offset designation
D - Tool radius offset designation
T - Tool Designation
M - Miscellaneous function
G codes, M codes and cycle parameters
These are group of commands to create and start a program.
G – codes M - codes
G00 ..... Positioning (Rapid traverse)
G01 ..... Linear interpolation (feed)
G02 ..... Circular interpolation clockwise
G03 ..... Circular interpolation counterclockwise
G04... Dwell
G72... Finishing cycle
G73... Stock removal in longitudinal turning
G74... Stock removal in facing
G78... Multiple threading cycle
G80..... Cancel cycle
G83 ..... Drilling cycle
G84 ..... Tapping cycle
G85 ..... Reaming cycle
G90 ..... Absolute programming
G91 ..... Incremental programming
G94 ..... Feed per minute
G95 ..... Feed per revolution
G96 ..... Constant cutting speed
G97..... Constant spindle speed
G98..... Return to initial plane
G99 ..... Return to withdrawal plane
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
M30 Program stop, reset to start
Carbide Tool (inserts)
The chief constituent of
cemented carbide is tungsten
or molybdenum, cobalt and
carbon.
At a temperature of 90deg
Celsius cemented carbide still
maintains a good cutting
capability and as such it can
be used for operations which
require high spindle speed.
Right hand turning tool
The right-hand turning tool is
shaped to be fed from right to left.
Different Cutting Tool and its Application
Left hand turning tool
The left-hand turning tool
is just the opposite of the right-hand
turning tool, being designed to cut
the metal when fed from left to
right.
External threading tool
Use to cut external threads in a
work
Boring tool
-Boring tools are used to cut, finish
and enlarge inner diameter of
holes. It is also use to remove extra
material from the inside diameter of
an existing hole, such as drilled
Use to enlarge a drilled hole
Internal threading tool
Basically use for inside/internal
threading. Commonly used
threading tools are carbide inserts
and HHS.
Twist Drill Bits
Twist drill bits are some of the most common
shop tools to create holes, They're available
in a wide range of sizes.
Material composes of titanium coated, black
oxide and cobalt.
Turning operations
PROGRAM STRUCTURE
(CNC Lathe)
Example:
O0001 (Shaft)
N5 T0101
N10 G96 S___ M___
N15 G95 F___
O0001 – program number
T0101- tool call and correction
number
T01- tool holder 1
01 -correction number
N5 – block number
G96 s200 m3
G96-constant cutting speed
S200-spindle speed in m/min
M3-spindle on forward
G95 f.2
G95-feed in mm/revolution (f=.2)
G Codes and Cycle parameters
G00 – position of the
tool and not concerned with
the path that is followed in
arriving at the final
destination.
Format:
G01 – Tool is required to move in
a straight line connecting current
position and final position. Used
for tool movement without any
machining- point to point control.
(linear interpolation)
Format:
G02 – Circular in interpolation
(clockwise)
-This command is anything with
circular interpolation
Format:
G03– Circular in
interpolation (Counter
clockwise)
-This command is
anything with circular
interpolation
Format:
G04 - Dwell
-This command is used
when drilling
-when the drilling tool dips at
the end
of the drilling depth tool will
stops in a matter of seconds
depending on the program.
G40 – Cancel Radius
compensation
This command is used cancel the
radius Compensation of a tool
used.
Format:
G41 – Cutter radius
compensation left
This command is used when your
tool Is viewed at the left side of
the contour
Format:
G41 – Cutter radius compensation right
This command is used when your tool
Is viewed at the right side of the contour
Format:
G72 – Finishing cycle
This cycle will start its cycle from the
very first path until the end path of
the machining operation
Format:
G73 – Stock removal turning
This will start its cycle from the
very first path until the end path of the
machining operation removing
stock within depth and width of material to be
remove.
Format:
G74 – Stock removal facing
This will start its cycle from the
very first path until the end path of the
machining operation removing
stock within the width of material to be
remove.
Format:
G77 – Cut-in- Cycle
This will start its cycle from the
first path to be cut off until the end path of
The machining operation removing
stock within the width of material to be
remove considering the tool width.
Format:
G78
In this cycle all information of
like pitch, depth, angle of thread,
length and minor diameter must
be in this cycle.
Format:
G83 – Drilling cycle
In this cycle all information in
drilling must be entered like
final drilling depth, the path to
drill X and Z coordinates,
retraction path and cutting
depth per cut.
Format:
G94 – Feed per minute
With G94 all feed is in Feed in millimeters/min
G95 – Feed per revolution
With G95 all feed is in Feed in millimeters/rev.
- it is seen in chart/table the different feed per revolution of a material
Material Rough cut Finish Cut
in mm in mm
Machine Steel 0.010 - 0.020 0.025 - 0.050 0.003 - 0.010 0.007 - 0.025
Tool Steel 0.010 - 0.020 0.025 - 0.050 0.003 - 0.010 0.007 - 0.025
Cast Iron 0.015 - 0.025 0.040 - 0.065 0.005 - 0.012 0.013 - 0.030
Bronze 0.015 -0.025 0.040 - 0.065 0.003 - 0.010 0.007 - 0.025
Aluminum 0.015 - 0.030 0.040 - 0.075 0.005 - 0.010 0.013 - 0.025
G96 – Constant cutting speed
With G96 the cutting speed of a
material is programmed.
-with the cutting speed of a material
the spindle speed is computed
constantly.
Material
Rough cut
Finish Cut Threading
ft/min. m/min. ft./min m/min.
ft./
min
m/min.
Machine
Steel
90 27 100 30 35 11
Tool Steel
70 21 90 27 30 9
Cast Iron
60 18 80 24 25 8
Bronze
90 27 100 30 25 8
Aluminum
200 61 300 93 60 18
G97 – Revolutions per minute (RPM)
- The spindle speed is computed
with this formula:
english
RPM=4 X CS/D
metric
RPM=320 X CS/D
where:
RPM = Revolutions per minute
CS = Cutting speed (f/min or m/min)
D =
Diameter of Workpiece (inch or
mm)
IPR /mmpr= Inches per rev./millimeters per rev.