CNC Milling Programming and Operation
CHAPTER 1
INTRODUCTION
CONVENTIONAL MACHINES:
In a conventional m/c parameters like feed, depth of cut and speed are manually controlled
by the operator. The accuracy of the job depends mainly on the skill of the worker. These
machines have the following disadvantages.
1. More time consumption.
2. Less accuracy.
3. Less production.
4. Requires skilled labor.
5. More wastage of material.
1.1 EVOLUTION OF CNC MACHINES
1.1.1 NUMERICAL CONTROL MACHINE:
Numerical control means directing, guiding or retaining power over something by the use
of numbers. Numerical control can defined as a form of programmable automation on which the
process is controlled by numbers, letters and symbols. A numerically controlled m/c tool is
basically a conventional m/c tool where the operator is replaced by punched tape containing
various machining instructions. The numbers, letters and symbols gathered together and logically
organized to direct a m/c tool for a specific job are called an NC program. An NC m/c tool with a
mini computer as the controller unit is called as CNC machine tool. The year which followed
world war-II increased the needs of aerospace industries that created demands on the capabilities
of m/c tools. Using techniques which had advanced rapidly during the war, machine tool
designers & electronic engineers together built machine tools to produce profiles & shapes that
were nearly impossible by conventional machine tools. US Air force combined with Parsons
corp. to produce first NC machine in the year 1947. The term numerical control was coined by
Massachusetts institute of technology, USA. By mid 1960s, Russia, Japan, West-Germany,
England etc was, leading manufacturers of NC machines.
Department of Mechanical Engineering, RNSIT, Bengaluru Page 1
CNC Milling Programming and Operation
1.1.2 CNC MACHINES:
In earlier days the conventional machines were used in industries where the operator used
to control the various machining parameters such as feed, speed, depth of cut etc. in the year
1947, the united states Air force introduced NC machine for manufacturing Air craft
components. But these machines were commercially available in the year 1955. In the year 1971,
there was a rapid development in the field of electronics like integrated circuits and micro
controllers were developed. These devices were used to control the NC machines. A simple
computer was interfaced to the NC system which stored the data, instructions and programs
which were required to run the CNC machines. In a CNC machine all the numerical functions
are controlled by the computer. The computer also gives the display of various parameters of the
machine like spindle speed, feed rate, depth of cut etc. It consists of electronic instrumentation to
measure the output.
MAJOR DIFFERENCES BETWEEN CONVENTIONAL MACHINES, NC AND CNC
MAJOR DIFFERENCES BETWEEN CONVENTIONAL, NC AND CNC
MACHINES:
TOPIC CONVENTIONAL M/C NC CNC
Communication Hand wheel/Push Punched CD,
button tapes Floppy,DNC
Repeatability Not possible Possible Possible
Complex & Precision jobs Not possible Possible Possible
Cost(Basic+Maintenance) Low Medium High
Table 1
Department of Mechanical Engineering, RNSIT, Bengaluru Page 2
CNC Milling Programming and Operation
Figure 1
CONVENTION MACHINE
Department of Mechanical Engineering, RNSIT, Bengaluru Page 3
CNC Milling Programming and Operation
Figure 2
NC MACHINE
Department of Mechanical Engineering, RNSIT, Bengaluru Page 4
CNC Milling Programming and Operation
FANUC CNC MACHINE
Figure 3
FANUC develops cutting edge CNC and motion control systems for a wide range of applications
from basic high-volume, high-repetition commodity production to unique, highly complex, parts
that require the highest precision and advanced machining techniques
With industry leading reliability (up to 52-year Mean-Time-Between-Failure rates) and lifetime
parts and maintenance support, FANUC controls provide the lowest total cost of ownership, low
operating costs, high performance and a high resale value.
FANUC CNC systems, drives, motors, I/O and connectivity combine to provide the best
machine performance for applications ranging from the most simple and straightforward to the
most complex.
This is the machine we used at the GT&TC to execute most of our programs which were written
and those programs were even used to machine on job using different tools and different
centralization processes.
Department of Mechanical Engineering, RNSIT, Bengaluru Page 5
CNC Milling Programming and Operation
SIEMENS CNC MACHINE
Figure 4
SINUMERIK combines automation, technology competence and digitalization to form a unique
range of solutions, thus increasing the productivity. SINUMERIK CNC systems are the optimum
solution for individual parts or mass production, for simple or complex workpieces.
Department of Mechanical Engineering, RNSIT, Bengaluru Page 6
CNC Milling Programming and Operation
Figure 5
SINUMERIK PANEL USED IN CNC
This compact and user friendly entry-level solution is used for turning and milling applications.
Features such as a simple operation, easy commissioning and maintenance- and also an optimum
cost position – represent the perfect basis for equipping entry-level CNC machines.
It is clear that the most of the CNC machines are using these two controllers. If you buy a new
control, they both have comparable capabilities.Market share percentage is about 30% for each
one.
Siemens gives the builder all of the options but FANUC charges for options.Siemens is more
flexible from a machine tool builder perspective.Siemens has long descriptions of parameters
and help files.
FANUC is a bit more expensive when compared with other controllers.FANUC is much more
prevalent in the US market.
Siemens controls are more powerful, faster, and easier to use.Siemens is complicated and over
designed. Siemens can control more axes up to 93.It’s typically easier to troubleshoot problems
on FANUC.
Everything is an option on FANUC, where it's standard on most other controls. FANUC is more
reliable from a hardware perspective.
Department of Mechanical Engineering, RNSIT, Bengaluru Page 7
CNC Milling Programming and Operation
CHAPTER 2
TECHNICAL CHARACTERISTICS AND APPLICATION
The main technical characteristics of the machining centres are as follows:
1. The milling cutters can be differentiated by their type of teeth, cutting direction or shape.
2. The spindle axis may be horizontal (the z-axis is horizontal), vertical (z-axis is vertical) or
universal.
3. The milling machine can have 3 axes, 4 axes (three linear axes plus one rotary table) or 5 axes
(three linear axes plus 2 rotary axes).
4. The production speed (this also depends on the material and the machined part).
Figure 6
Department of Mechanical Engineering, RNSIT, Bengaluru Page 8
CNC Milling Programming and Operation
ADVANTAGES:
1. It eliminates human errors.
2. Requires semi-skilled labor.
3. Higher flexibility.
4. High accuracy.
5. Wastage is minimum.
6. Suitable for batch production.
7. Less space is required.
8. Reduces inspection cost.
9. More operational safety.
10. Quality of product is high.
DISADVANTAGES:
1. Initial cost is high.
2. It require skilled programmer.
3. It is not suitable for small scale production.
4. Maintenance cost is more.
APPLICATIONS:
1. Numbers of operations per component are many.
2. Complexity of the operation.
3. Size of batches is medium.
4. Repetition of batches is large.
5. Layout cost of the component is high.
6. Variety of components to be produced is more.
7. Design changes are frequent.
8. Number of dimension in a component is more.
9. Precision required in a component.
10. Uniform cutting conditions.
Department of Mechanical Engineering, RNSIT, Bengaluru Page 9
CNC Milling Programming and Operation
CHAPTER 3
CNC PROGRAMMING
What is CNC programming?
It is a set of instructions given to the machine to perform a given task.
CNC Programming can be done in two ways:
1. EIA/ISO Format (Fanuc/ISO Control)
EIA: Electronics industries association O-series.
ISO: International standard organization.
In this method programming can be done by use of G and M codes.
G codes are called preparatory functional codes and M codes are called miscellaneous/ Machine
function/ on-off functions.
2. Dialogue based programming (Heidenhain / Mazatrol control)
In this method the programming can be done by use of symbols like line, circle, square, ellipse,
pentagon, spline, multi-line etc.
Figure 7
Department of Mechanical Engineering, RNSIT, Bengaluru Page 10
CNC Milling Programming and Operation
CHAPTER 4
G AND M CODES
Following are the G and M codes used in CNC Programming:
4.1 G codes for Milling m/c
• G00-Rapid traverse
• G01-Linear traverse
• G02-Circular interpolation in CW
• G03-Circular interpolation in CCW
• G04-Dwell
• G05-Moves in the same direction as the last arc to be performed
• G06-Tangential arc
• G07-Single arc
• G11-linear polar
• G12-Circular polar CW
• G13-Circular polar moves CCW
• G15-Moves in the same direction as the last arc to be performed
• G16-Tangential arc polar
• G17-Selection of XY plane
• G18-Selection of XZ plane
• G19-Selection of YZ plane
• G28-Mirror image
• G30-Blank form(Bottom corner of billet)
• G31- Blank form(Top corner of billet)
• G40-Tool radius compensation cancel
• G41-Tool radius compensation left side
• G42-Toolradius compensation right side
• G43-Tool length offset
• G90-Absolute dimensioning
• G91-Incremental dimensioning
• G98-Start to initial point/Label
• G99-Tool definition
• G54,G55,G56…….:Work offset/work datum
• G74-Slot milling
• G75-Rectangular pocket(CW)
Department of Mechanical Engineering, RNSIT, Bengaluru Page 11
CNC Milling Programming and Operation
• G76- Rectangular pocket (CCW)
• G77-Circular pocket (CW)
• G78-Circular pocket (CCW)
• G79-Cycle call
• G80-Cancellation of CANNED cycle
• G81/G82-Spot drilling/Boring
• G83-Peck drilling
4.2 M codes for Milling m/c
• M00-Program stop
• M01-Optional stop
• M02-Program end
• M03-Spindle in CW
• M04-Spindle in CCW
• M05-Spindle stop
• M06-Tool change
• M08-Coolant pump ON
• M09-Coolant pump OFF
• M10-Work clamp open
• M11-Work clamp close
• M13-Spindle forward + coolant ON
• M14- Spindle forward + coolant OFF
• M19-Spindle orientation
• M20-ATC Arm in
• M21-ATC Arm out
• M22-ATC Arm down
• M23-ATC Arm up
• M24-ATC Arm clamping activate
• M25-Atc Arm clamping release
• M30-Program end
• M32-ATC CW rotation
• M33-ATC CCW rotation
• M38-Door open
• M39-Door close
• M98-Sub program call
• M99-Subprogram repetition(Incremental depth)
Department of Mechanical Engineering, RNSIT, Bengaluru Page 12
CNC Milling Programming and Operation
4.3 G codes for Turning m/c
• G00-Rapid traverse
• G01-Linear traverse
• G02-Circular movement CW
• G03-Circular movement CCW
• G04-Dwell for programed duration
• G05-Delay/Hold(Until resumed by operator)
• G10-Offset value setting by program
• G20-Inch data input
• G21-Metric data input
• G22-Stored stroke check on
• G23- Stored stroke check off
• G27-Reference point return check
• G28-Reference point return
• G29-Return from reference point
• G30-Return to 2nd Reference point
• G31-Skip function
• G32-Thread cutting
• G34-Variable lead thread cutting
• G36-Automatic tool compensation--X
• G37-Automatic tool compensation--Z
• G40-Tool nose radius compensation cancel
• G41-Tool nose radius left
• G42-Tool nose radius right
• G50-Work co-ordinate/Max.spindle speed setting
• G65-Macro program call
• G66-Macro modal call
• G67-Macro modal call cancel
• G70-Finishing cycle in turning
• G71-Stock removal in turning(Multiple turning cycle)
• G72-Stock removal in facing
• G73-Pattern repeating
• G74-Peck drilling cycle
• G75-Grooving in X axis
• G76-Thread cutting cycle(Multiple thread cutting)
• G81-Drilling cycle
• G90-Absolute dimensioning
• G91-Incremental dimensioning
• G92-Thread cutting cycle
• G94-Facing cycle
• G96-Constant cutting speed
• G97-Constnt surface speed control cancel(variable surface)
• G98-Feed per minute
• G99-Feed per revolution
Department of Mechanical Engineering, RNSIT, Bengaluru Page 13
CNC Milling Programming and Operation
4.4 M codes for Turning m/c
• M00-Program stop
• M01-Optional stop
• M02-Program end
• M03-Spindle in CW
• M04-Spindle in CCW
• M05-Spindle stop
• M06-Auto tool change
• M07-Coolant ‘’B’’ ON
• M08-Coolant ‘’A’’ ON
• M09-Coolant OFF
• M10-Çhuck open
• M11-Chuck close
• M13-Spindle forward + coolant ON
• M14- Spindle reverse + coolant OFF
• M16-Special tool call(Tool call ignores turret)
• M19-Spindle orientation
• M20-Spindle index A
• M21-Spindle index 2A
• M22-Spindle index 3A
• M23-Spindle index 4A
• M25-Quill extend
• M26-Quill retract
• M29-Select DNC mode
• M30-End of program and rewind
• M31-Increment part counter
• M37-Door open to stop
• M38-Door open
• M39-Door close
• M62-Output 1 on
• M63-Output 2 on
• M64-Output 1 off
• M65-Output 2 off
• M98-Sub program call
• M99-Subprogram repetition(Incremental depth)
Department of Mechanical Engineering, RNSIT, Bengaluru Page 14
CNC Milling Programming and Operation
CHAPTER 5
DIMENSIONING
There are two types of dimensioning:
• Absolute dimensioning (G90)
• Incremental dimensioning (G91)
1. Absolute dimensioning:
In absolute dimensioning all the dimensions/points are measured from common reference
point or zero point. This zero point is called datum point.
Figure 8
Department of Mechanical Engineering, RNSIT, Bengaluru Page 15
CNC Milling Programming and Operation
2. Incremental dimensioning:
In incremental dimensioning all the points are measured from current tool position. These
dimensions are measured from the previous measuring point.
Figure 9
Department of Mechanical Engineering, RNSIT, Bengaluru Page 16
CNC Milling Programming and Operation
CHAPTER 6
PROGRAMMING TYPES
Two type of programming:
1. Offline programming
2. Online programming
In offline programming
Initial information:-
Analyzing of part Drawing
Part number, material, size means maximum length, width, height and diameter.
Input condition like casting/forge/bar
Process details like Drilling, Machining, inspection, Heat treatment.
Allowances / Tolerance, Control dimension
Machine :-
Milling, lathe, Grinding etc.
Specification of machine eg:-stroke length, Spindle axis
In Part Programming
CNC programming include:-
Alphabets[A-Z]
Number[0-9]
Symbols [/ ;()]
G-codes: - Generating profile creating those called G-codes. (Preparatory function)
M-codes: - Miscellaneous function vary from machine to machine depending on the function
available on it and manufacturing of the machine decides them.
Department of Mechanical Engineering, RNSIT, Bengaluru Page 17
CNC Milling Programming and Operation
CHAPTER 7
CNC PROGRAMS
CNC Part Programs to mill the components as per drawing:
Department of Mechanical Engineering, RNSIT, Bengaluru Page 18
CNC Milling Programming and Operation
Department of Mechanical Engineering, RNSIT, Bengaluru Page 19
CNC Milling Programming and Operation
Department of Mechanical Engineering, RNSIT, Bengaluru Page 20
CNC Milling Programming and Operation
Department of Mechanical Engineering, RNSIT, Bengaluru Page 21
CNC Milling Programming and Operation
Department of Mechanical Engineering, RNSIT, Bengaluru Page 22
CNC Milling Programming and Operation
Department of Mechanical Engineering, RNSIT, Bengaluru Page 23
CNC Milling Programming and Operation
Department of Mechanical Engineering, RNSIT, Bengaluru Page 24
CNC Milling Programming and Operation
Department of Mechanical Engineering, RNSIT, Bengaluru Page 25
CNC Milling Programming and Operation
CHAPTER 8
SUMMARY AND CONCLUSION
The main objective of the Internship was to learn and gain knowledge regarding the CNC
Milling Programming and Operation M/s Govt. Tool-Room and Training Centre. We have
gained significant amount of experience in operating the CNC Machines and coding for the
given drawings for a span of 4 weeks.
We were given access to the FANUC CNC Machine as well as the SIEMENS CNC Machine in
the institutes respective work areas set up for training. This access to operation of machines
openly in such environment has immensely helped us gain confidence in operating real time
CNC machines and their operations.
We even received training regarding handling of the workpiece by various methods and its
centralization and dimensioning the way it is to be done as per standards. Maximum execution of
programs were done using the FANUC CNC machine which is internationally more widely used.
We were exposed to all of its functions from verifying the program via the panel in the machine
and executing them to obtain the drawing and later conducting the milling operation on the given
workpiece. This Internship has immensely helped us gain confidence in the environment and
knowledge regarding the industrial CNC machines.
Department of Mechanical Engineering, RNSIT, Bengaluru Page 26
CNC Milling Programming and Operation
CHAPTER 9
REFERENCES
1. Standard charts and tabled from M/s GT & TC.
2. www.google.com
3. www.wikipedia.com
4. www.prototechasia.com
5. www.fanucamerica.com
Department of Mechanical Engineering, RNSIT, Bengaluru Page 27