0% found this document useful (0 votes)
93 views18 pages

Introduction To CNC

Uploaded by

Favour Lawrence
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
93 views18 pages

Introduction To CNC

Uploaded by

Favour Lawrence
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

INTRODUCTION TO CNC by Engr. Noble O.

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.

Fig. 1. CNC Milling machine tool


2.4. Driving System
The motors that move the tool along the various machine axes are referred to as the driving
system. In a typical CNC mill, the cutting tool is moved up and down along the z-axis while the
bed is moved horizontally along the x- and y-axes. In a typical CNC lathe, the cutting tool is
moved collinearly with the axis of rotation of the workpiece. Instead of moving transverse to
the rotational axis of the workpiece, the cutting tool is inserted into the material's outer
diameter. Servo motors, ball screws, and linear guides are frequently used to regulate
movement in CNC machines. The ball screw nut can be moved precisely by servos to place
the different mechanical parts.
2.5. Display Unit
The display unit is an operator-facing screen that shows crucial information. Some displays
have huge, high-resolution panels that show a lot of data, while others have small, low-
resolution screens that simply show the bare minimum. The display unit demonstrates how
the user interacts with various CNC machine features, such as entering G-code or modifying
machine settings. The display device also displays the machine's operational status at the
moment.
In a case where the CNC uses an external computer system, this will be the Monitor for the
computer. This monitor could also show the progress of the work done as the machining
process is being carried out as well as other information that can also be viewed from an
embedded computer. This computer will also serve as a point for keying in the computer
program for the machining process.
2.6. Bed
The raw material/workpiece to be machined is installed on a CNC mill's bed. The workpiece is
held firmly in place using a variety of work-holding jigs. The bed is usually fitted with t-slots
or holes where the jigs can be fastened. Conventional CNC machines can only move
horizontally along the x and y axes, but more sophisticated 5-axis machines can also rotate
around these axes.

Fig 2. CNC Milling Bed with a workpiece clamped.


For the CNC Lathe and as is with other Lathe Machines, the Bed size is what determines the
capacity of the machine. It houses the Carriage and tail stock.
2.7. Headstock
The main drive, bearings, and gears required to rotate the chuck at the speeds needed for
machining are located in the headstock, a part exclusive to a lathe. On a CNC lathe, the
headstock is located on the left side. Typically, the headstock is enclosed and accessible only
through detachable inspection panels.
2.8. Tailstock
Long, cylindrical workpieces are supported axially on one side by a CNC lathe component
known as the tailstock, while the other side is rotated and supported by the chuck. The
material will deflect away from the cutter without the tail stock due to the forces produced
during cutting. The raw material is centred on the tailstock quill which rotates freely in the
tailstock. It is especially useful for cutting components like power screws or shafts. To
accommodate various raw material lengths, the tailstock can only move along the lathe z-
axis.
2.9. Chuck
The raw material is held in place while it is being machined on a lathe by a device known as
the chuck. The spindle rotates the chuck quite quickly. A chuck typically contains three or four
grips that are hydraulically or pneumatically activated. Three-jaw chuck grips are self-
centring. All the grips move radially at the same time. Four-jaw chucks provide individual
adjustability and non-self-centering grips. Compared to three-jaw models, four-jaw chucks
are more accurate. They allow for eccentric cutting, as their position can be precisely
controlled to account for any variation in the raw material.
2.10. Control Panel
The control panel contains the input device, the display unit, the keyboard, and other control
buttons to help operators interact with the CNC machine. The control panel is often attached
to the CNC machine with an extendable arm that allows the operator to position the screen
in a convenient location.
In cases where the CNC is connected to an external computer system, the machine can have
two control panels. One on the body of the CNC and the other accessible via the proprietary
software that ships with the CNC machine.
In some other cases, the CNC might not have any major control interface or panel on the
machine and is solely controlled via an attached computer system. This is very common for
miniature or desktop CNC machines used mainly for training or educational purposes.
Fig 3. CNC Control Panel
3.0. Types of CNC machining equipment
3.1. CNC Milling
Milling employs rotating multi-point cutting tools to shape the workpiece. Milling tools are
either horizontally or vertically oriented and include end mills, helical mills, and chamfer mills.
The CNC milling process utilizes CNC-enabled milling machinery, referred to as mill machines
or mills, which can be horizontally or vertically oriented. Basic mills are capable of three-axis
movements, with more advanced models accommodating additional axes like 5-axis milling.
The CNC milling operation for a 3-axis mill is carried out on the X, Y, and Z axis. The cutting
tool is always stationary and only moves up and down on the Z axis while the workpiece
moves freely on the X and Y axis.

Fig. 4 Boxford 300MVCi CNC 3-axis milling Machine


3.2. CNC Turning/Lathe
The CNC lathe carries out turning operations by employing single-point cutting tools to
remove material from the rotating workpiece. The design of the turning tool varies based on
the particular application, with tools available for roughing, finishing, facing, threading,
forming, undercutting, parting, and grooving applications.
The CNC turning operation is carried out on only two axes, the X and the Z axis. The workpiece
is placed along the Z axis while the X axis is along the radius of the workpiece.

Fig. 5 Boxford 250PCi CNC Lathe Machine

4.0 Types of CNC Machining Support Software


Software programs are used in the CNC machining process to guarantee the accuracy,
precision, and optimization of the component or product that has been specifically created
for it. Examples of used software include:

• 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

G00 Fast move Fast move


G01 Linear interpolation Linear interpolation
G02 Circular Interpolation CW Circular Interpolation CW
G03 Circular interpolation CCW Circular interpolation CCW
G04 Dwell Dwell
G09 Exact stop check Exact stop check
G10 Data setting Data setting
G11 Data setting cancel Data setting cancel
G15 — Polar coordinates
G16 — Polar coordinates cancel
G17 — XY plane designate
G18 — ZX plane designate
G19 — YZ plane designate
G20 Set English units Set English units
G21 Set metric units Set metric units
G22 Stored stroke check on Stored stroke check on
G23 Stored stroke check off Stored stroke check off
G25 Spindle speed fluctuation detect on Spindle speed fluctuation detect on
G26 Spindle speed fluctuation detect off Spindle speed fluctuation detect off
G27 Machine zero position check Machine zero position check
G28 Machine zero return (point 1) Machine zero return (point 1)
G29 Return from machine zero Return from machine zero
G30 Machine zero return (point 2) Machine zero return (point 2)
G31 Skip function Skip function
G32 Threading constant lead —
G35 Circular threading CW —
G36 Circular threading CCW —
G40 Tool nose radius offset cancel Cutter radius offset cancel
G41 Tool nose radius offset left Cutter radius offset left
G42 Tool nose radius offset right Cutter radius offset right
G43 — Tool length offset positive
G44 — Tool length offset negative
G49 — Tool length compensation cancel
G50 Maximum rpm pre-set Scaling function cancel
G51 — Scaling function
G52 Local coordinate system set Local coordinate system set
G53 Machine coordinate system set Machine coordinate system set
G54 Work coordinate 1 Work coordinate 1
G55 Work coordinate 2 Work coordinate 2
G56 Work coordinate 3 Work coordinate 3
G57 Work coordinate 4 Work coordinate 4
G58 Work coordinate 5 Work coordinate 5
G59 Work coordinate 6 Work coordinate 6
G60 — Single direction positioning
G61 Exact stop mode Exact stop mode
G62 Automatic corner override mode Automatic corner override mode
G63 — Tapping mode
G64 Cutting mode Cutting mode
G65 Custom macro call Custom macro call
G66 Custom modal macro call Custom macro modal call
G67 Custom modal macro call cancel Custom modal macro call cancel
G68 Mirror image for double turrets Coordinate system rotation
G69 Mirror image for double turrets cancel Coordinate system rotation cancel
G70 Profile finishing cycle —
G71 Profile roughing cycle Z axis direction —
G72 Profile roughing cycle X-axis direction —
G73 Pattern repetition cycle High-speed peck drilling cycle
G74 Drilling cycle Left-hand threading cycle
G75 Grooving cycle —
G76 Threading cycle Fine boring cycle
G80 — Fixed cycle cancel
G81 — Drilling cycle
G82 — Spot drilling cycle
G83 — Peck drilling cycle
G84 — Right-hand threading cycle
G85 — Boring cycle
G86 — Boring cycle
G87 — Back boring cycle
G88 — Boring cycle
G89 — Boring cycle
G90 Cutting cycle AA /Absolute command Absolute command
G91 Incremental command Incremental command
G92 Tool position register Tool position register
G94 Feed rate per minute —
G95 Feed rate per revolution —
G96 Constant surface speed —
G97 Constant spindle speed —
G98 Feed rate per minute Return to the initial level in a fixed
cycle
G99 Feed rate per revolution Return to R level in a fixed cycle

Table 2: M-Code Commands for Lathe and Milling Operations:


Code Function
M00 Program stop
M01 Optional program stop
M02 End of program
M03 Spindle start forward CW
M04 Spindle start reverse CCW
M05 Spindle stop
M06 Stop the spindle and coolant and Change tool command
M08 Coolant on
M09 Coolant off
M29 Rigid tap mode
M30 End of program reset
M40 Spindle gear at Middle
M41 Low Gear Select
M42 High Gear Select
M68 Hydraulic chuck close
M69 Hydraulic chuck open
M78 Tailstock advancing
M79 Tailstock reversing
M94 Mirror image cancel
M95 Mirror image of the X axis
M98 Subprogram call
M99 End of subprogram

4.2.3. CNC Programming Coordinate Systems.


CNC programming uses coordinate systems to determine how the machine responds to
measured movement commands while machining. Two coordinate systems are being used:
a. Incremental
b. Absolute.
These two coordinate measuring systems are used to determine the values that are inputted
into the programming code for the X, Y and/or Z program words. They can also be used in the
same manner for rotary axes A, B and/or C.
A. Incremental Coordinate system (G91).
In incremental systems, every measurement refers to a previously dimensioned position
(point-to-point). Incremental dimensions are the distances between two adjacent points.
B. Absolute Coordinate system (G90)
In absolute programming, all coordinate values are relative to a fixed origin of the coordinate
system. Axis movement in the positive direction does not require the inclusion of the sign;
while negative movements do require signs.
The coordinate notations for the points on the drawing in Figure 1 below (in absolute and
incremental systems) for a milling operation are shown in Table 2 below:

Fig 6. An example tool path for a milling operation.


Table 3: Coordinate notations for the points in Figure 1.
Points For G90 ABSOLUTE Points For G91 INCREMENTAL
P1 G90 X0 Y0 P1 G91 X0 Y0

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

P7 G90 X6 Y6 P7 G91 X2 Y-1

P8 G90 X8 Y8 P8 G91 X2 Y2

P9 G90 X8 Y4 P9 G91 X0 Y-4

P10 G90 X5 Y4 P10 G91 X-3 Y0

4.2.4. CNC Datums


A Datum position is simply a reference point from which measurements can be taken while
performing a CNC machining operation. In CNC machining, datums play a crucial role in
defining the reference points and coordinate systems that help ensure accurate and
consistent part production. They provide a fixed point of origin on the workpiece or machine
for positioning and machining operations. They also establish the fundamental points of
measurement and orientation, allowing CNC machines to precisely locate and manufacture
parts as per design specifications (see Fig 2 below).

Fig 7. Datum positions for CNC turning operation


Workpiece Cutting tool
+X

-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.

Fig 9. Datum positions for 3-axis CNC milling operation.


4.2.5. Sample CNC Programs
A. Turning
In this case, the workpiece has a length of 80mm and a diameter of 20mm.
N10 G21 ; Set Metric system
N20 X60.000 Z10.000 T01 ; Rapid move to parking position and select Tool 1
N30 G96 M04 S225 ; Set constant surface speed to 225 RPM and start spindle rotation
N40 G00 Z0.000 ; Rapid move to an initial position above the workpiece
N50 X20.000 ; Rapid move to the radius of the workpiece
N60 G01 X18.000 F100.00 ; Feed move to the roughing depth 0f 2.00mm
N70 Z-40.000 ; Rough the workpiece for a 40mm length of cut reducing the radius to 17mm
N80 G00 Z0.000 ; Rapid move back to the initial position above the workpiece
N90 X15.000 F100 ; Feed move to the roughing depth 0f 5.00mm
N100 Z-20.000 ; Rough the workpiece for a 20mm length of cut reducing the radius to 15mm
N110 G00 X60.000 Z10.000 ; Rapid move back to parking position
N120 M05 ; Spindle OFF
N130 M30 ; End Program

Fig 10: Final Product of the above turning operation.


B. Milling
In this scenario, a workpiece of thickness 20mm and dimensions 70 x 70mm was used and a
square path of dimensions 55x55mm and path thickness of 2mm was engraved 3mm deep
into the workpiece.
G21 ; Set Metric System
M06 T01 ; Stop spindle, stop coolant and select Tool 1
G00 X0.000 Y0.000 Z30.000 ; Rapid move to workpiece datum at 30mm above the workpiece
M03 S3500 ; Spindle on and set spindle speed to 3500 rpm
G00 X15.000 Y15.000 Z2.000 ; Rapid move to square start position
G01 Z-3.000 F150.00 ; Feed move to the roughing depth of 3mm
Y55.000 ; Rough trace a path 55mm along the length of the workpiece
X55.000 ; Continue on the path 55m along the width of the workpiece
Y15.000 ; Continue on the path 55m along the length of the workpiece
X15.000 ; Rough trace back to starting point of the traced square
G00 Z30.000 ; Retrieve the cutting tool 30mm above the workpiece
M05 ; Spindle stop
M30 ; End program

Fig 11: Final Product of the above milling operation.


5.0 Advantages and Disadvantages of CNC
5.1. Advantages
The use of CNC (Computer Numerical Control) technology has several advantages and
benefits in a variety of industries. Some of the main benefits of CNC are as follows:
a. High Precision and Accuracy: Complex machining operations can be carried out by CNC
machines with great precision and accuracy. By removing the possibility of human mistakes
through computer control, reliable and reproducible results are ensured.
b. Greater Productivity: Compared to manual machining techniques, CNC machines can run
continuously for prolonged periods, enabling higher production rates and output.
c. Flexibility and Customization: CNC technology enables quick changes in production and
component customization without the need for expensive retooling. It also makes it possible
to easily tweak and modify machining programs.
d. Lower labour costs: Once programmed, CNC machines require little human input,
lowering the demand for trained labour and streamlining production procedures.
e. Automation and Unmanned Operation: CNC machines can run unattended, enabling
"lights-out" manufacturing, in which work is done even after regular business hours,
increasing productivity.
f. Complex Geometries: CNC machines may produce intricate and complex geometries that
are difficult or impractical to accomplish using manual machining techniques.
g. Consistency and Quality Control: CNC reduces scrap and rework while improving overall
product quality by ensuring consistent part quality and conformance to design standards.
h. Shorter Lead periods: With CNC machining, quicker setup periods and shorter cycle
durations make it possible to deliver finished goods to clients in a shorter amount of time.
i. Safety and Operator Comfort: CNC machines improve workplace safety by reducing
operator fatigue and exposure to dangerous machining environments.
j. Material Savings: By minimizing material waste, CNC machines may optimize material
consumption and lower costs for raw materials.
k. Integration with CAD/CAM Software: CNC machines are capable of integrating easily
with CAD and CAM software, which makes programming easier and improves design
possibilities.
l. High-Volume Production: CNC machines are ideal for mass production, making it possible
to produce identical parts in huge quantities quickly and effectively.
m. Real-Time Monitoring: Many contemporary CNC machines are fitted with monitoring
systems that offer data on tool wear, process status, and potential problems in real time,
allowing for effective production scheduling and preventative maintenance.
n. Multi-Axis Machining: CNC machines are capable of multi-axis machining, which enables
complex operations to be completed in a single setup while simultaneously cutting in
various directions.
Overall, CNC technology transforms the production process by offering enhanced efficiency,
accuracy, and versatility, resulting in increased output, cost savings, and higher-quality
products.
5.2. Disadvantages
a. Initial Investment Cost and Need for Professional Labor: CNC machines demand a sizable
initial investment and optimal setup and operation call for professional operators and
programmers.
b. Limited Creativity and Programming Complexity: CNC programming lacks the
improvisational and inventive problem-solving talents of expert manual machinists. It can be
difficult, demanding specialized knowledge.
c. Limited Customization and Material Suitability: CNC machines may not be the greatest
choice for highly specialized or niche parts because they are better suited for materials like
metals and plastics, which restricts their applicability.
d. Safety Issues and Single Point of Failure: While CNC increases safety, precautions must
be taken during setup, tool changes, and maintenance, also a malfunction might completely
halt production.
e. High Energy Consumption and Maintenance Costs: Extended CNC operation can result in
excessive energy consumption, and routine maintenance is required to guarantee the best
machine performance.
f. Complexity of Multi-Axis Machining and Tooling Costs: Multi-axis CNC machines have
sophisticated capabilities but demand complex programming and specialized tooling, both
of which can be expensive.
It's critical to keep in mind that despite its drawbacks, CNC technology is still an essential
tool in contemporary manufacturing because of all of its positive aspects. Planning, getting
the right training, and being aware of the constraints can help organizations maximize CNC
while minimizing potential risks.

You might also like