7/30/2019 CNC Basic & Prog.
1/89
WELCOMETO
FUTURE CNC TRAINIG INSTITUTE
CENTRE OF EXCELLENCE.
7/30/2019 CNC Basic & Prog.
2/89
CNC MACHINING (Turning VMC,HMC)
&
PROGRAMMING
7/30/2019 CNC Basic & Prog.
3/89
EDUCATIONAL
QUALIFICATION
10th, 12th, ITI, Diploma, Degree (Any
Trade )
7/30/2019 CNC Basic & Prog.
4/89
CNC MACHINING (Turning VMC,HMC)
&
PROGRAMMING
7/30/2019 CNC Basic & Prog.
5/89
COURSE CONTENT
Definition of CNC History of CNC Types of CNC Main Parts of CNC Makers of CNC Operating Panel Introduction of CNC Programming
Setting of CNC Machines Engineering Drawing / MeasuringInstrumnets
CNC Maintenance
7/30/2019 CNC Basic & Prog.
6/89
CNC : Computer and Numeric Control
Conventionally, an operator decides and adjustsvarious machines parameters like feed , depth ofcut 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.
What is a CNC Machine ?
7/30/2019 CNC Basic & Prog.
7/89
Overview
By integrating a computer processor, computernumerical control, or CNC as it is now known,
allows part machining programs to be edited and
stored in the computer memory as well as
permitting diagnostics and quality control functionsduring the actual machining.
All CNC machining begins with a part program,
which is a sequential instructions or coded
commands that direct the specific machine
functions.
The part program may be manually generated or,
more commonly, generated by computer aided part
C f
7/30/2019 CNC Basic & Prog.
8/89
The most basic function of any CNC machine is automatic,precise, and consistent motion control.
Rather than applying completely mechanical devices to
cause motion as is required on most conventional machinetools, CNC machines allow motion control in a
revolutionary manner.
All forms of CNC equipment have two or more directions
of motion, called axes. These axes can be precisely andautomatically positioned along their lengths of travel.
The two most common axis types are linear (driven along
a straight path) and rotary (driven along a circular path).
Motion Control The Heart of
Machine
7/30/2019 CNC Basic & Prog.
9/89
Basic CNC Principles
7/30/2019 CNC Basic & Prog.
10/89
Coordinates System
Absolute Coordinate System Incremental Coordinate System
7/30/2019 CNC Basic & Prog.
11/89
Basic CNC Principles
Each axis consists of a mechanical component, such as a slide thatmoves, a servo drive motor that powers the mechanical movement,
and a ball screw to transfer the power from the servo drive motor to the
mechanical component.
These components, along with the computer controls that govern
them, are referred to as an axis drive system.
7/30/2019 CNC Basic & Prog.
12/89
The method of accurate work positioning in relation to the cuttingtool is called the rectangular coordinate system. On the vertical
mill, the horizontal base line is designated the X axis, while the
vertical base line is designated the Y axis. The Z axis is at a right
angle, perpendicular to both the X and Y axes.
Increments for all base lines are specified in linear measurements,
for most machines the smallest increment is one ten-thousandth of
an inch (.0001). If the machine is graduated in metric the smallest
increment is usually one thousandth of a millimeter (.001mm).
The rectangular coordinate system allows the mathematical plottingof points in space. These points or locations are called coordinates.
The coordinates in turn relate to the tool center and dictate the tool
path through the work.
Work Positioning
7/30/2019 CNC Basic & Prog.
13/89
Basic CNC Principles
7/30/2019 CNC Basic & Prog.
14/89
CNC Machines-
Advantages/Disadvantages
Advantages : -
High Repeatability and Precision e.g. Aircraft parts
Volume of production is very high
Complex contours/surfaces need to be machined. E.g. Turbines
Flexibility in job change, automatic tool settings, less scrap
More safe, higher productivity, betterqualityLess paper work, faster prototype production, reduction in leadtimes
Disadvantages: -Costly setup, skilled operators
Computers, programming knowledge required
Maintenance is difficult
7/30/2019 CNC Basic & Prog.
15/89
Types of CNC Machine
1 CNC Turning
2 CNC Vertical Machining Centre
3 CNC Horizontal Machining Centre4 CNC Grinder
5 CNC Tool & Cutter
6 CNC Wire Cutter
7 CNC Welding
7/30/2019 CNC Basic & Prog.
16/89
Main Parts of CNC
Turning Center ( TC )
Vertical Machining Center ( VMC )
7/30/2019 CNC Basic & Prog.
17/89
CNC Turning Center
Automated version of a manual lathe.
Programmed to change tools automatically.
Used for turning and boring wood, metal andplastic.
Main Parts :
MECHANICAL PARTS
ELECTRICAL PARTS
7/30/2019 CNC Basic & Prog.
18/89
CNC Turning Center Parts
Mechanical :
Head Stock :- It is used for holding the Jobs
a ) Draw Bar: Operated by Hydraulic Pressure & used for Opening &closing of Jaws.
b) Jaws : It is used for Holding the Job
c) Chuck : It is used for Holding the Jaws.Tail Stock :- It is used to support Longer Jobs.
Turret :- It is used to holding the tool and supports against cutting forceduring cutting.
a) Tool Holder : It is fitted in slot of turrets & used for holding tools.
b) Drive system : It is used for turret indexing.
MECHANICAL PARTS
ELECTRICAL PARTS
7/30/2019 CNC Basic & Prog.
19/89
CNC Milling Machine
Has 3 ~ 8 Axes.
Used for wood, metal and plastic.
Used to make 3D prototypes, moulds, cutting
dies,
printing plates and signs.
7/30/2019 CNC Basic & Prog.
20/89
How CNC WorksControlled by G and M codes.
These are number values and co-ordinates.
Each number or code is assigned to a particularoperation.
Typed in manually to CAD by machine operators.
G&M codes are automatically generated by thecomputer software.
7/30/2019 CNC Basic & Prog.
21/89
Features of CNC Machinery
The tool or material moves.
Tools can operate in 1~5 axes.
Larger machines have a machine control unit(MCU) which manages operations.
Movement is controlled by a motors
(actuators).
Feedback is provided by sensors
(transducers)
Tool magazines are used to change tools
automatically.
7/30/2019 CNC Basic & Prog.
22/89
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.
7/30/2019 CNC Basic & Prog.
23/89
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, orabsolutes versus incremental modes.
A M letter specifies miscellaneous machine
functions and work like on/off switches for coolantflow, tool changing, or spindle rotation. Other letter
addresses are used to direct a wide variety of other
machine commands.
7/30/2019 CNC Basic & Prog.
24/89
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 designationZ - Z axis designation
R - Radius designation
F Feed rate designation
S - Spindle speed designationH - Tool length offset designation
D - Tool radius offset designation
T - Tool Designation
M - Miscellaneous function
7/30/2019 CNC Basic & Prog.
25/89
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
7/30/2019 CNC Basic & Prog.
26/89
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
7/30/2019 CNC Basic & Prog.
27/89
Table of Important G codes
G00 Rapid Transverse
G01 Linear InterpolationG02 Circular Interpolation, CW
G03 Circular Interpolation, CCW
G17 XY Plane,G18 XZ Plane,G19 YZ Plane
G20/G70 Inch units
G21/G71 Metric Units
G40 Cutter compensation cancelG41 Cutter compensation left
G42 Cutter compensation right
G43 Tool length compensation (plus)
G43 Tool length compensation (plus)
G44 Tool length compensation (minus)
G49 Tool length compensation cancelG80 Cancel canned cycles
G81 Drilling cycle
G82 Counter boring cycle
G83 Deep hole drilling cycle
G90 Absolute positioning
G91 Incremental positioning
7/30/2019 CNC Basic & Prog.
28/89
Table of Important M codesM00 Program stopM01 Optional program stop
M02 Program end
M03 Spindle on clockwiseM04 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
7/30/2019 CNC Basic & Prog.
29/89
APT Programming ExampleCylindrical Part
F25
F22.5
F17.5
20
Raw Material
Finished Part
70
30
7/30/2019 CNC Basic & Prog.
30/89
APT Programming Example (CylindricalPart)
O0013
N0005 G53N0010 T0303N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X22.50 Z2.0 S500N0080 G01 Z-30.0 F100N0090 G00 X23.0 Z2.0 S500
N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 G00 Z2.0N0120 X50.0 Z50.0N0130 M30
7/30/2019 CNC Basic & Prog.
31/89
APT Program Interpretation
O0013
Program identification number
7/30/2019 CNC Basic & Prog.
32/89
APT Program Interpretation
O0013
N0005 G53
To cancel any previous working zero
point
7/30/2019 CNC Basic & Prog.
33/89
APT Program Interpretation
O0013
N0005 G53N0010 T0303
N0010 Sequence numberT0303 Select tool number 303
APT Program
7/30/2019 CNC Basic & Prog.
34/89
O0013
N0005 G53N0010 T0404N0020 G57 G00 X26.0 Z0.0 S500 M04
G57 To set the working zero point as saved
G00 Rapid movement (no cutting)X26.0 Xlocation (as a diameter; 13 form zero)Z0.0 ZlocationS500 Spindle speed is 500 rpmM04 Rotate spindle counterclockwise
APT ProgramInterpretation
x
z
(0,0) +ve
+ve
7/30/2019 CNC Basic & Prog.
35/89
O0013
N0005 G53
N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100
G01 Linear interpolation (cutting)
X-0.20 Move only in x direction untilyou pass
the center by 0.1 mm (facing)F100 Set feed rate to 100 mm/min.
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
36/89
O0013N0005 G53
N0010 T0404
N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0
G00 Move rapidly away from work piece (nocutting)Z2.0 the movement is 2 mm away from theface.
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
37/89
O0013
N0005 G53
N0010 T0404
N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0
Go to a safe location away from the workpiece[x = 50 (25 from zero), z = 50] to change the tool.
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
38/89
O0013
N0005 G53N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04
N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404
T0404 Select tool number 404
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
39/89
O0013N0005 G53
N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X22.50 Z2.0 S500
G57 PS0G00 Rapid movement (no cutting)X22.50 Xlocation (as a diameter; 11.25 form zero)Z2.0 ZlocationS500 Spindle speed is 500 rpm
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
40/89
O0013
N0005 G53
N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04
N0080 G01 Z-30.0 F100
G01 Linear interpolation (cutting)Z-30 Move only in z direction (external turning)F100 Set feed rate to 100 mm/min.
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
41/89
O0013
N0005 G53
N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04
N0080 G01 X22.5 Z-70.0 F100N0090 G00 X23.0 Z2.0 S500
G00 Move rapidly away from work piece (nocutting) to location x= 23.0 (11.50 from zero)
and z = 2.0.
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
42/89
O0013
N0005 G53N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650
G84 Turning cycle for machining the stepX17.5 final diameterZ-20 length of step is 20 mmD0=200 Finish allowance in X direction (0.2 mm)D2=200Finish allowance in Z direction (0.2 mm)D3=650 Depth of cut in each pass (0.65 mm)
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
43/89
O0013
N0005 G53N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100
N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500
N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 G00 Z2.0
G00 Move rapidly away from workpiece (nocutting)
Z2.0 the movement is 2 mm away from the face.
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
44/89
O0013N0005 G53N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100
N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100
N0090 G00 X26.0 Z2.0 S500N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 G00 Z2.0N0120 X50.0 Z50.0
X50.0 Z50.0 Move to the tool changing location
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
45/89
O0013
N0005 G53N0010 T0404N0020 G57 G00 X26.00 Z0.0 S500 M04N0030 G01 X-0.20 F100
N0040 G00 Z2.0N0050 X50.0 Z50.0N0060 T0404N0070 G57 G00 X25.00 Z2.0 S500 M04N0080 G01 X22.5 Z-70.0 F100N0090 G00 X26.0 Z2.0 S500
N0100 G84 X17.5 Z-20.0 D0=200 D2=200 D3=650N0110 G00 Z2.0N0120 X50.0 Z50.0 T00N0130 M30
M30 Program End
APT Program Interpretation
7/30/2019 CNC Basic & Prog.
46/89
Programming Example
Raw Material FinishedPart
7/30/2019 CNC Basic & Prog.
47/89
Programming Example
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75
N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5N011 M05N012 M02
x
y
7/30/2019 CNC Basic & Prog.
48/89
Programming Example
Tool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400
N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150
N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150N013 M05N014 M02
x
y
7/30/2019 CNC Basic & Prog.
49/89
Program Interpretation
G55 X200 Y80Setting the datum to the lower left corner of thework piece
7/30/2019 CNC Basic & Prog.
50/89
Program Interpretation
G55 X200 Y80Program 1
Program Identification Number
7/30/2019 CNC Basic & Prog.
51/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1
N001 Sequence NumberM06 Tool Change (End Mill with
Diameter=12mmT1 Tool Number
7/30/2019 CNC Basic & Prog.
52/89
Program Interpretation
G55 X200 Y80
Program 1N001 M06 T1N002 M03 rpm 400
Start rotating the spindle clockwisewith 400 rpm
7/30/2019 CNC Basic & Prog.
53/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
Go to Safe Position with feed150mm/min
7/30/2019 CNC Basic & Prog.
54/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400
N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150
Lower the end mill to determine thedepth of cut
7/30/2019 CNC Basic & Prog.
55/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75
Move from the lower left cornerof the work piece to the rightlower one cutting withfeed=75mm/min
7/30/2019 CNC Basic & Prog.
56/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400
N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75
Move from the lower left corner of thework piece to the right lower one
cutting with feed=75mm/min
7/30/2019 CNC Basic & Prog.
57/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75
Cutting the horizontally up toX=30
7/30/2019 CNC Basic & Prog.
58/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75
Cutting to X=0 & Y=40
7/30/2019 CNC Basic & Prog.
59/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75
N009 G01 X0 Y0 Z-0.5 XYFeed 75
Complete the countering
7/30/2019 CNC Basic & Prog.
60/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75
N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5
Repeat 7 times blocks from N003 toN009 with incremental offset of Z=-0.5
7/30/2019 CNC Basic & Prog.
61/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400
N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75
N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75
N008 G01 X0 Y40 Z-0.5 XYFeed 75N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5
N011 M05
Spindle Off
7/30/2019 CNC Basic & Prog.
62/89
Program Interpretation
G55 X200 Y80Program 1N001 M06 T1N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X-8 Y0 Z-0.5 ZFeed 150N005 G01 X70 Y0 Z-0.5 XYFeed 75N006 G01 X70 Y60 Z-0.5 XYFeed 75N007 G01 X30 Y60 Z-0.5 XYFeed 75N008 G01 X0 Y40 Z-0.5 XYFeed 75N009 G01 X0 Y0 Z-0.5 XYFeed 75N010 G81 R3 E9 N7 Z-0.5N011 M05N012 M02
End Program
7/30/2019 CNC Basic & Prog.
63/89
Program Interpretation
Tool Change
Changing the tool
7/30/2019 CNC Basic & Prog.
64/89
Program Interpretation
Tool ChangeG55 X200 Y80
Setting the datum to the lower left corner of the workpiece
7/30/2019 CNC Basic & Prog.
65/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2
Program Identification Number
7/30/2019 CNC Basic & Prog.
66/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2
N001 M06 T2
N001 Sequence NumberM06 Tool Change (Drill withDiameter=6mm
T2 Tool Number
7/30/2019 CNC Basic & Prog.
67/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2
N001 M06 T2N002 M03 rpm 400
Start rotating the spindle clockwise with400 rpm
7/30/2019 CNC Basic & Prog.
68/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
Go to Safe Position with feed 150mm/min
7/30/2019 CNC Basic & Prog.
69/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150
Stop above the center of the first hole
7/30/2019 CNC Basic & Prog.
70/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75
Start Drill the first hole
7/30/2019 CNC Basic & Prog.
71/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150
N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150
Retract to a position above the hole
7/30/2019 CNC Basic & Prog.
72/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150
Stop above the center of the second hole
7/30/2019 CNC Basic & Prog.
73/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400
N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150
N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75
Drill the second hole
7/30/2019 CNC Basic & Prog.
74/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150
N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75
N009 G01 X50 Y15 Z10 ZFeed 150
Retract to a position above the second hole
7/30/2019 CNC Basic & Prog.
75/89
Program Interpretation
Tool Change
G55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400
N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150
N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150
Stop above the center of the third hole
7/30/2019 CNC Basic & Prog.
76/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2
N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed150N005 G01 X20 Y15 Z-10 ZFeed 75
N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150
N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75
Drill the third hole
7/30/2019 CNC Basic & Prog.
77/89
Program Interpretation
Tool ChangeG55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75
N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150
Retract to a position above the third hole
7/30/2019 CNC Basic & Prog.
78/89
Program Interpretation
Tool Change
G55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75
N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150N013 M05
Spindle off
7/30/2019 CNC Basic & Prog.
79/89
Program Interpretation
Tool Change
G55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150N013 M05N014 M02
End Program
7/30/2019 CNC Basic & Prog.
80/89
Program Interpretation
Tool Change
G55 X200 Y80Program 2N001 M06 T2N002 M03 rpm 400N003 G01 X-8 Y0 Z0 XYFeed 150
N004 G01 X20 Y15 Z10 XYFeed 150 ZFeed 150N005 G01 X20 Y15 Z-10 ZFeed 75N006 G01 X20 Y15 Z10 ZFeed 150N007 G01 X50 Y15 Z10 ZFeed 150N008 G01 X50 Y15 Z-10 ZFeed 75N009 G01 X50 Y15 Z10 ZFeed 150N010 G01 X50 Y45 Z10 ZFeed 150N011 G01 X50 Y45 Z-10 ZFeed 75N012 G01 X50 Y45 Z10 ZFeed 150N013 M05N014 M02
End Program
7/30/2019 CNC Basic & Prog.
81/89
Thank You
7/30/2019 CNC Basic & Prog.
82/89
CNC MILLING
7/30/2019 CNC Basic & Prog.
83/89
INTRODUCTION OF CNC
MILLING PROGRAMMING
CUTTING TOOLS FOR CNC
7/30/2019 CNC Basic & Prog.
84/89
CUTTING TOOLS FOR CNC
MILLINGCUTTING PARAMETERS
TOOLS PATTERNS
FACTORS AFFECTING MILL PARTS
SELECTION OF TOOLS
INTRODUCTION OF CNC
7/30/2019 CNC Basic & Prog.
85/89
TURNING And Milling
PROGRAMMINGFANUC CONTROLL1 INTRODUCTION OF FANUC CONTROLLER2 PLANNING FOR OPERATIONS
3 PART PROGRAMMING
4 STOCK REMOVAL CYCLE
5 DRILLING CYCLE
6 BORING CYCLE
7 THREAD CUTTING CYCLE
7/30/2019 CNC Basic & Prog.
86/89
PROGRAM TRANSFERSPROGRAM PREPARATION WITH CAD CAMPROGRAM DATA TRANSFER FROM PC TOCNC M/C
PROGRAM DATA TRANSFER FROM PC TO DNC
OPERATIONS
7/30/2019 CNC Basic & Prog.
87/89
SAFETY PRECAUTIONSSAFE HANDLING OF TOOLS
SAFE HANDLING OF EQUIPMENTS
RIGHT WAY TO CNC OPERATING.
CLEANLINESS OF CNC MACHINE & SHOP
*Lecture Notes *I t d ti t CNC M hi
7/30/2019 CNC Basic & Prog.
88/89
Introduction to CNC Machines
and CNC Programming
C l d G d
7/30/2019 CNC Basic & Prog.
89/89
Commonly used G codes
G00 Preparatory code to control final position of thetool and not concerned with the path that is followed in
arriving at the final destination.
G01 Tool is required to move in a straight lineconnecting current position and final position. Used for
tool movement without any machining- point to point
control. (linear interpolation)
G02 Tool path followed is along an arc specified by I, Jand K codes.( circular interpolation)