Introduction To CNC
Introduction To CNC
Nweze
1.0 Introduction
The term CNC stands for 'Computer Numerical Control'. There is a clear difference between
the CNC machining and the CNC machine —one is a process and the other is a machine.
1.1 CNC Machine:
A CNC machine (sometimes incorrectly referred to as a C and C machine) is a programmable
machine that is capable of autonomously performing the operations of CNC machining. It is
usually controlled by an external Computer, an inbuilt computer or in some cases a
combination of both. Some CNC machines can operate autonomously after the computer
program is being fed without the need of human intervention by the use of robots or robotic
arms while others require occasional human interventions at different stages of the
machining process. In other cases, some CNC machines are also capable of manual machining
operations.
1.2 CNC Machining:
CNC machining can be defined as a subtractive manufacturing process that typically employs
computerized controls and machine tools to remove layers of material from a stock piece—
known as the blank or workpiece, hence producing a custom-designed part. This process is
suitable for a wide range of materials, including metals, plastics, wood, glass, foam, and
composites. Its application spreads across a variety of industries, such as large-scale CNC
machining, machining of parts and prototypes for telecommunications, CNC machining of
shells and enclosures for electronic gadgets, CNC machining aerospace parts and automobile
industries, which require tighter tolerances than other industries.
CNC machining is a subtractive machining process and it is in contrast to additive
manufacturing processes, such as 3D printing, or formative manufacturing processes, such as
liquid injection moulding. Additive processes assemble layers of material to produce the
desired form and formative processes deform and displace stock material into the desired
shape. While subtractive processes remove layers of material from the workpiece to produce
custom shapes and designs. The automated nature of CNC machining enables the production
of high precision and high accuracy, simple parts and cost-effectiveness when fulfilling one-
off and medium-volume production runs. However, while CNC machining demonstrates
certain advantages over other manufacturing processes, the degree of complexity and
intricacy attainable for part design and the cost-effectiveness of producing complex parts is
limited.1.
2.0 Basic Components of a CNC System
2.1. Input Device
The “input device” for a CNC machine is the medium by which CNC programs are loaded into
the machine. This input device could be the keyboard (to directly input G-code commands), a
USB flash drive (to transport a completed program from another computer), or wireless
communication (if the program is to be downloaded from another computer using the local
network).
2.2. Machine Control Unit (MCU)
The MCU (machine control unit) is a combination of electrical hardware and software that
reads G-code from the input device and converts it into commands that tool drivers can use
to carry out the desired machining operations. It is one of the most crucial parts of a CNC
machine. The MCU translates the G-code data into servo motor movements along several
machine axes. To make sure that the tool is in the desired position when the movement is
finished, it additionally reads data from feedback sensors. Following the G-code, the MCU
also manages coolant activation and tool changers.
2.3. Machine Tools
The term "machine tools" is used to describe any tool that has the potential to process a
workpiece, typically cutting tools. Depending on the type of CNC machine, machine tools can
take many different forms. To perform cuts, CNC lathes employ stationary tools and feed
spinning raw material into the tool. CNC mills move spinning tools into stationary material.
However, more advanced 5-axis machines can move both the tool and the workpiece,
allowing for the creation of final parts with more intricate characteristics. In "tool libraries,"
which are machine racks for storing all the tools that would be needed to make a part,
machine tools are frequently preserved. A tool changer automatically installs the following
tool after removing the previous one from the spindle and storing it in the tool library.
• CAD
• CAM
• CAE
4.1. CAD
Computer-aided design (CAD) software is a program used to draft and produce 2D vector or
3D solid parts and surface renderings, as well as the necessary technical documentation and
specifications associated with the part. A CAM program often uses the plans and models
produced by a CAD application to develop the machine program required to produce the
component using a CNC machining technique. Additionally, CAD software can be used to
define and analyze the best part qualities, assess and confirm part designs, simulate products
without a prototype, and give manufacturers and job shops design data. Examples include
AutoCAD, AutoDesk Inventor, Solid Works etc.
4.2. CAM
Computer-aided manufacturing (CAM) software is used to build the machine code required
to operate the CNC machine and control the tooling. They produce the custom-designed item
by extracting technical data from the CAD model. The CNC machine may operate
independently of an operator thanks to CAM software, which can also automate the
evaluation of the final product.
4.3. CAE
Computer-aided engineering (CAE) software is a program used by engineers during the pre-
processing, analysis, and post-processing phases of the development process. CAE software
is used as an assistive support tool in engineering analysis applications, such as design,
simulation, planning, manufacturing, diagnosis, and repair, to help with evaluating and
modifying product design. Types of CAE software available include finite element analysis
(FEA), computational fluid dynamics (CFD), and multibody dynamics (MDB) software.
It is important to note that in some cases, CNC Machining Support Software applications
combine all of the aspects of CAD, CAM, and CAE software. These integrated programs,
typically referred to as CAD/CAM/CAE software, allow a single software program to manage
the entire fabrication process from design to analysis to production.
4.0. CNC Programming
4.1. Introduction
CNC programming is the process of creating instructions that control computer numerical
control (CNC) machines. These instructions, often written in a programming language such as
G and M code, provide precise instructions to the machine on how to move, position, and
perform machining operations on the workpiece.
CNC programming is essential for transforming a design or a product concept into a tangible
reality. It involves breaking down the desired part or component into a series of steps and
commands that the CNC machine can understand and execute. The programming language
used communicates information about tool paths, cutting speeds, feed rates, tool changes,
and other parameters necessary for machining operations.
To write a CNC program, programmers need a solid understanding of the machine's
capabilities, the tools available in the tool palette, and the desired outcome. They translate
the design specifications into a series of coded instructions, taking into account factors such
as tool selection, tool paths, cutting depths, and feed rates. Additionally, they must consider
safety measures and optimize the program for efficiency and accuracy.
It is important to test and verify the G&M code in a CNC simulation software before machining
to ensure the accuracy and safety of both machine and the operator. To this effect, Some CNC
machines are shipped with proprietary CNC simulation software and G&M coding tools that
help the operator adhere to the machine’s specifications and also effectively test and verify
Codes before feeding them into the CNC machine.
4.2. G & M code
G-codes and M-codes are essential components of CNC (Computer Numerical Control)
programming. They are alphanumeric commands used to control the movements and
functions of CNC machines during machining operations.
4.2.1. G-code: Also known as Geometry Code, is the code or language that CNC programmers
use to instruct computers and CNC machines to create parts. It's an international standard
language that directs the positioning and speed of a machine's components based on X, Y and
Z coordinates.
4.2.2. M-code: Also known as Machine Code, is a coding language that controls non-
geometrical, miscellaneous functions, such as spindle rotation and coolant functioning. M-
codes can vary based on the type of CNC machine it is directing.
In most cases, if not all modern applications of machine coding, these two are combined as
G&M codes to code up machining instructions to be fed into a CNC machine. These work hand
in hand to deliver the finished product.
Table 1: G codes for Turning and Milling.
Code Turning Milling
P2 G90 X0 Y4 P2 G91 X0 Y4
P3 G90 X2 Y4 P3 G91 X2 Y0
P4 G90 X2 Y5 P4 G91 X0 Y1
P5 G90 X4 Y6 P5 G91 X2 Y1
P6 G90 X4 Y7 P6 G91 X0 Y1
P8 G90 X8 Y8 P8 G91 X2 Y2
-Z
+Z
Workpiece
-X datum
Fig 8. A schematic diagram of a workpiece attached to a CNC lathe Jaw showing the turning
operation coordinates and workpiece datum position.