What is CNC Machining? Comprehensive Guide

What is CNC Machining? Comprehensive Guide

What is CNC Machining? Comprehensive Guide

CNC machining is a process of material removal by a computer-controlled tool. The operator programs the computer system, which then controls the movement of the tool, producing the desired cut. It is an extremely precise machining technique with a high repeatability index, ideal for batch and mass production systems.

What are the steps involved in CNC machining? And does it always give perfect results?

This article dives into the CNC machining process while discussing its types, steps, and terminology.

CNC Machining: Explained

A CNC milling machine working on a metal workpiece.
A CNC milling machine working on a metal workpiece.

Generally, CNC machining is performed by rotating the tool or workpiece at high speed and using a computer system to guide its movements along the X, Y, and Z axes.

Typical CNC machining involves a 3-axis system for cutting, milling, drilling, boring, and engraving applications.

However, CNC systems with 4, 5, or 6-axis systems are also available for machining intricate parts with complex geometries.

Working of CNC Machine

Basic components of a CNC system.
Basic components of a CNC system.

CNC machine is a traditional machining tool or equipment integrated with a computer system or machine control unit (MCU).

It consists of various elements such as a computer, CNC controller (embedded with CNC firmware such as GRBL), CNC shieldmotor drivers, and stepper or servo motors to control the movement of the drive system.

The CNC operator inputs the design and machining parameters to the computer system, converting them into G-codes.

A CNC controller system then translates these G-codes into electrical signals that control the movement of the drive system of the CNC machine.

The movement of the drive system positions the cutting tool accurately, tracing the path for the desired machining process.

CNC Machining Essential Terminology

CNC machining process involves various terms that you need to familiarize yourself with before stepping into CNC manufacturing.

CAD Software

AutoCAD window
Interface of AutoCAD software

Computer-Aided Design (CAD) is the use of a computer system to create a 2D or 3D replica of the desired cut or process in the form of a digital file.

There are various CAD software available for preparing the design of CNC machining.

Most CAD software produce vector designs that are made up of geometrical shapes based on mathematical equations.

This makes it possible to scale a vector design without distorting the image or affecting its quality.

Popular CAD software, such as CorelDraw, Illustrator, Solid Works, etc., provide the option to export the design files in various supported formats.

STEP (.step, .stp) and IGES (.iges, .igs) files are most commonly used CAD files for CNC machining. Some other CNC design file formats are SVG, DXF, AI, DWG, CDR, EPS, and PDF.

CAM Software

EstlCAM CAM software
EstlCAM CAM software

Computer-Aided Manufacturing (CAM) is the use of a computer system to control the machining process.

CAM software is used to automate a CNC manufacturing process by setting the various machining parameters and defining the tool path.

These software are also known as control software as they provide the ability to control the CNC machining process through a computer system.

Some of the popular CAM software are CamBamEstlCAMMeshCAM, etc.

These software take in the design files exported by CAD software as input and convert them into G-codes.

G-codes

G-code and toolpath visualization(Source: NC Viewer webiste)
G-code and toolpath visualization (Source: NC Viewer webiste)

Geometric Code (G-code) is one of the most popular programming languages for Numerical control (NC) machines.

A CAM software converts a 2D or 3D design file into G-codes that are compatible with the controller of the CNC machine.

G-codes convey a set of instructions to the controller system that guides the motion of the cutting tool.

These G-codes are automatically generated by the CAM software and do not require to be memorized by the operator.

However, having basic knowledge of G-code programming can be useful in tweaking and troubleshooting the CNC machining process.

A typical G-code consists of an alphabet followed by a number, and a G-code command consists of the main G-code followed by an instruction.

For example, G-code "G01 X120.425000 Y22.787559 Z-1.000000 F350" commands the CNC machine to move the tool in a straight line to the specified coordinates (120.42500, 22.787559, -1.000000) in the XYZ plane with a feed rate of 350 mm/min.

Similarly, there are various G-codes that command the CNC machine to execute different actions for performing the required process.

G-codeAction
G00Rapid Positioning (Non-cutting movement)
G01Linear Interpolation
G02Circular Interpolation, Clockwise
G03Circular Interpolation, Counterclockwise
G17XY Plane selection
G18ZX Plane selection
G19YZ Plane selection
G20Programming in inches
G21Programming in millimeters
G28Return to home position

Commonly used G-codes and their function

M-codes

M-codes or Miscellaneous codes are similar to G-codes, but while G-codes control the movement of the cutting head, M-codes deal with tool change, coolant system, program stops, etc.

These codes are generally used in combination with G-codes for toggling on/off various machine features.

M-codeFunction
M03Spindle on (Clockwise)
M04Spindle on (Counterclockwise)
M05Spindle stop
M06Automatic tool change (ATC)
M07Coolant on (Mist)
M08Coolant on (Flood)
M09Coolant off
M19Spindle orientation

Commonly used M-codes and their functions

Tools Used in CNC Machining

CNC router end mills
CNC router end mills

Tool in CNC machining refers to the equipment with sharp edges, used for machining the workpiece.

CNC machines are versatile in nature and can perform various machining operations on different materials.

There are various cutting tools that are used depending upon the workpiece material and the type of machining operation to be performed.

For example, when using a CNC router or CNC mill for a machining operation, the selection of cutting tool plays an important role in the quality and speed of the cut.

Milling soft materials like plastic and aluminum require an end mill with a higher helix angle that facilitates easy chip clearance away from the tool's surface.

Whereas, milling hard materials like steel and titanium generally requires a carbide end mill that can deliver strong cutting force without breaking.

Similarly, different machining operations require different tools, such as CNC turning operations on a lathe require a turning tool.

While most CNC machines support easy tool change, CNC machines like laser cutters do not provide the flexibility of changing the tool for each application.

However, laser cutters are versatile machines capable of performing various operations without the need to change the tool.

Automatic Tool Change

Automatic tool changer unit capable of holding 24 tools
Drum type automatic tool changer unit capable of holding 24 tools

CNC machines are used for automating a production process.

However, these machines require human inputs in the form of designing, setting the machining parameters, and changing the tool.

Most modern CNC machines have been integrated with an automatic tool change (ATC) feature.

Automatic tool changers are of two types: Drum type and Chain type.

The drum type ATC is used when the number of tools used for a machining process is less (under 30), whereas the chain type ATC provides the ability to hold comparatively more tools (above 30).

An automatic tool changer consists of a gripper mechanism to change the tool.

After receiving the M-code from the controller, the gripper grabs the old tool from the turret and replaces it with the desired tool.

For example, M-code M06 T10 will command the CNC machine to replace the current tool with tool number 10 from the ATC system.

This increases the productivity of CNC machining operations by reducing the tool change time.

Machining Tolerance

Machining tolerance indicates the permissible deviation from the actual dimensions of the part.

Although CNC machining produces parts with high accuracy, there is always scope for error during machining.

Tolerance determines the amount of precision required during the CNC machining of the part.

It is generally denoted by "±" followed by a numerical value.

For example, a 20" long part with a tolerance of ±0.5 indicates to the machinist that the permissible length for the part ranges between 19.5" to 20.5".

Therefore, parts with tight tolerance have less scope for error and require high precision, whereas parts with larger tolerance demand comparatively less precision.

Speeds, Feeds & Depth of Cut in CNC Machining

Feed rate, speed and depth of cut
Feed rate, speed, and depth of cut

Speeds, feeds, and depth of cut are the most important machining parameters in CNC machining.

The speed parameter determines the spindle rotation during the CNC process.

It is generally defined in terms of Rotations per minute (RPM) or Surface feet per minute (SFM).

RPM depicts the rotations made by the spinning tool or workpiece per minute, whereas SFM depicts the surface of the workpiece machined by the cutting tool per minute.

The feed parameter determines the rate at which the tool advances along the surface of the workpiece to remove the material.

It is generally measured in inches per minute (ipm) or inches per revolution (ipr).

Depth of cut, as the name suggests, is the depth at which the tool removes the material.

It determines the thickness of the material removed during the machining process and is generally measured in inches or millimeters (mm).

Positioning System/Coordinate System

The coordinate system of a CNC machine generally consists of a 3-dimensional XYZ plane.

This means that the tool can be positioned by setting the XYZ coordinates for the desired position in the work area.

For example, G-code G01 X120.425000 Y22.787559 Z-1.000000 commands the CNC machine to move the tool in a straight line and position it in the work area where the XYZ coordinates match the values 120.425, 22.787559, and -1, respectively.

The control system guides the cutting tool to traverse the coordinate system and produce the desired cut.

Every coordinate system has a zero position, also known as the origin.

There are generally two types of zero positions in CNC machining: machine zero and work zero (program zero).

Work zero and machine zero
Work zero and machine zero

Machine zero is a fixed point in the coordinate system and is generally at the extreme position of the positive X, Y, and Z axes.

Whereas work zero is a programmable point in the coordinate system that the programmer sets for a particular job, generally at the leading edge of the workpiece.

MCS and UCS

Machine coordinate system (MCS) is the coordinate system with machine zero as the origin point.

Whereas User coordinate system (UCS) is a program-specific coordinate system with work zero as the origin point.

The UCS is used to guide the tool along the surface of the workpiece, whereas the MCS is used for guiding the tool to a pre-defined machine coordinate.

For example, during automatic tool change, the tool is accurately positioned at a pre-defined position by using MCS.

Backlash in CNC Machining

Backlash is an error that occurs in the form of an unwanted movement in the axes system.

This error is very small in magnitude and is generally most evident when the cutting tool traces a circular pattern.

Backlash is generally associated with the relative motion between the lead screw and the nut due to clearance in their threads.

This affects the positional accuracy of a CNC machine, thereby reducing its precision.

Therefore, an anti-backlash nut is used to overcome this defect and improve the positional accuracy of the system.

Steps Involved in CNC Machining

Performing a CNC machining operation consists of a few basic steps.

Preparing The Design

Preparing the design in LightBurn
Preparing the design in LightBurn

The initial step in CNC machining is using CAD software and preparing a computer graphic design that replicates the final cut.

Depending on the type of CNC machine used and the operation to be performed, the design can be a raster file or a vector file.

Raster files are generally used for CNC laser engraving and consist of millions of tiny elements called pixels.

Whereas vector files are made up of geometrical shapes and patterns.

This design file is then interpreted by CAM software and converted into G-codes.

There are various CNC software available for preparing the design and exporting the G-codes to the controller.

Setting the Parameters

After preparing the design file, it's time to set the optimal parameters for the machining process.

A CAM software or control software like Mach3 is used to set the parameters for a CNC machining process.

The optimal machining parameters for a process vary from one setup to another and from one material to another.

Therefore, it is advised to always perform test runs before machining the actual workpiece.

Generally, it is recommended to start your test runs at slow speeds and feeds, with small increments in every successive run, until you find the optimal results.

This prevents the risk of damaging the workpiece and ensures the best results.

Simulating The Machining Process

Simulation of a CNC machining process
Simulation of a CNC machining process (Source: NCSIMUL)

After preparing the design and setting the optimal parameters, you can use a CNC simulator software to simulate the machining process in a digital environment.

This helps to verify the machining process and identify any errors in the toolpath.

Setting Up the CNC Machine

Setting up the CNC machine involves installing the appropriate tool and securing the workpiece in place.

While some CNC machines (like routers and mills) require strong clamping force to hold the workpiece in place, others (like laser cutting) require no or minimal workpiece clamping.

Executing the Process

After verifying the toolpath and ensuring a fool-proof process, you can execute the CNC machining operation.

Generally, modern CNC machines are equipped with advanced safety features and work on a closed-loop CNC system that automatically detects and rectifies improper machining activities.

However, it is strongly advised to keep an eye on the process to avoid the risk of accidents.

Types of CNC Machining

Depending upon the type of CNC machine used and the type of operation being performed, there are various types of CNC machining processes.

CNC Turning

CNC Turning is performed by using a CNC lathe machine. In this process, the cutting tool machines the outer diameter of the workpiece.

It employs a single-point cutting tool and can be used to perform various operations, such as threading, taper turning, etc.

In this process, the workpiece is rotated at high speed, and the cutting tool removes the material by moving along the X and Y axes.

This process is ideal for machining cylindrical or other axially symmetric workpieces.

Although lathe machines generally operate on a two-axis system, CNC lathes with higher-axis systems are also available for machining complex workpieces.

CNC Boring

Boring is the process of increasing the internal diameter of an already drilled hole.

You can use a CNC lathe such as Proxxon PD 400  for boring operations, ideal for small batch CNC machining.

This process is similar to CNC turning, with the only difference being that the tool removes the material from the inside of a workpiece.

In this process, the workpiece rotates at high speed while a tool removes the material in the axial direction.

CNC Milling

CNC milling is the process of removing the material by using a multi-point cutting tool rotating at high speed.

The cutting tool is fixed in the chuck and rotated at a high RPM by a spindle or a router.

This process is used for performing various operations such as taping, shoulder milling, drilling, producing slots, etc., and is generally used for making gears.

You can use a CNC mill or a CNC router to perform milling operations.

A CNC mill consists of a worktable that can move along the X and Y axes and a rotating tool that plunges in and out of the workpiece by moving along the Z-axis.

On the other hand, a CNC router consists of a stationary work table while the rotating cutting tool moves along the X, Y, and Z axes to produce the desired cut.

Furthermore, when compared to CNC routers, CNC mills can be used for machining harder materials, whereas CNC routers can provide a larger work area.

Most CNC routers provide a rotary kit attachment that transforms your 3-axis CNC router into a 4-axis CNC router and allows you to work with cylindrical workpieces.

CNC Drilling

Drilling is the process of making holes in a surface by using a multi-point cutting tool rotating at high RPM.

CNC drilling can be performed using CNC milling machines or special vertical machining centers.

Drilling operation is generally performed to make holes for installing fasteners or for aesthetic reasons.

CNC Laser Cutting & Engraving

Laser cutting is the process of using a high-energy laser beam to burn, melt, or vaporize the material.

In this process, a laser module acts as the cutting tool that moves along the X and Y-axis to produce the desired cut.

Laser cutters, compared to CNC cutters, are faster and more precise machines, generally used to cut thin workpieces.

Although CNC laser cutters do not support quick tool change like other CNC machines, you can use the same laser module for cutting and engraving various materials by controlling the machining parameters.

However, a fiber laser is best suitable for laser cutting/engraving metal, and a MOPA fiber laser can be used for producing color laser engravings or markings on various materials.

CO2 laser, when compared to a fiber laser, produces better results for cutting and engraving non-metals.

These CNC machines are available in various price segments, ranging from cheap laser engravers under $500 to desktop laser engravers suitable for hobbyists, all the way to high-cost industrial fiber laser cutters.

CNC Waterjet Cutting

Water jet cutting is the process of using water at high pressure, generally above 50,000 psi, to produce the required cut.

This process works similarly to the erosion of rocks under the action of flowing water but at a much faster rate.

The water is generally accompanied by a fine dust of abrasive material that enhances the material removal and improves the cutting ability.

Waterjet cutting produces extremely precise cuts but at a much slower speed compared to laser cutting.

Wire EDM

Electron discharge machining (EDM) removes the material by using electrical discharge or sparks.

In this process, a fine wire acts as an electrode and produces sparks when brought in the vicinity of a conducting material.

These sparks raise the temperature to melt and vaporize the material, producing the desired cut.

A CNC Wire EDM machine consists of a computer system that guides the movement of the wire through the workpiece.

This process produces extremely precise cuts with tight tolerance and is ideal for applications such as medical and aerospace equipment manufacturing.

Speed, Quality and Cost- Can CNC Machining Achieve all 3?

Cost, Time and Quality
Relationship between cost, time, and quality of machining

Speed, quality, and cost are the three major factors that determine the efficiency of a machining process.

During a machining process, it is ideal to produce high-quality products with minimum cost and quick cycle time.

Although CNC machining can produce high-quality products with fast speed and low cost, perfecting a machining process in all 3 dimensions can be extremely difficult to achieve simultaneously.

However, CNC machining provides the ability to master the process in any two out of the three dimensions, with satisfactory results for the third one.

Performing a machining process with a quick cycle time while maintaining a low overall cost will sacrifice the quality of the product.

Whereas producing high-quality products with a quick cycle time will increase the overall cost of machining.

Similarly, producing high-quality products while minimizing costs will slow down the production rate.

Therefore, it is recommended to identify your requirements and program the machining process accordingly.

Things to Consider When Buying a CNC Machine

You need to consider various things when planning to buy a CNC machine.

Identify Your Application

The primary requirement for buying a CNC machine is to identify your application.

There are various CNC machines capable of performing different machining operations, and identifying your application will help you narrow down your search to a particular CNC machine.

For example, if your application requires CNC machining of a part with high precision and surface finish, irrespective of the cost and cycle time, then wire EDM and waterjet machining will be the ideal choice.

Similarly, when looking for a CNC machine for milling operations, a CNC mill can be used to machine hard materials, and a CNC router is an ideal choice for working on large workpieces.

Furthermore, a CNC plasma cutter is the ideal choice for sheet metal applications where low cost and quick cycle time are your primary objective.

Material Capability

CNC machines are versatile and can be used for machining various materials, provided that you set the optimal machining parameters and establish good process control.

However, the material capability of a CNC machine is affected by factors such as rigidity, maximum cutting speed, and tool compatibility.

For example, a CO2 laser is ideal for cutting and engraving non-metals, whereas a fiber laser produces the best results for machining metal workpieces.

Similarly, an entry-level CNC router is generally ideal for machining soft materials like wood, acrylics, plastics, and very thin workpieces of soft metals.

Rigidity of the CNC Machine

Chassis of Shapeoko HDM CNC router
Chassis of Shapeoko HDM CNC router

The rigidity of a CNC machine plays an important role in its machining ability.

A CNC router with a rigid chassis is capable of delivering greater cutting force, making it ideal for machining hard materials like steel, tungsten, etc.

Furthermore, a rigid chassis improves accuracy and helps produce parts with tight tolerance, thereby improving the performance of the CNC machine.

For example, using an entry-level CNC router with wooden chassis to work on a hard metal can sometimes result in the flexing of the machine.

This flexing is due to less rigidity of the chassis. 

It can affect the machining process by reducing its accuracy and delivering comparatively less cutting force than an equally capable machine with rigid chassis.

Therefore, if your requirement involves working with hard materials, it is advised to look for a CNC machine with a rigid structure.

However, non-contact CNC machines like laser cutters do not deliver strong cutting force, as they use a laser beam to produce the cut.

This eliminates the need for a rigid chassis in laser cutting machines, but a firm build enhances the marking and positional accuracy of the machine.

Work Area

Work area of ComgoZ1 laser engraver
Work area of ComgoZ1 laser engraver (Source: Comgrow)

The work area provided by a CNC machine is another critical factor that depends upon your application requirement.

A CNC machine with a small wok area will be a good choice for applications that involve customizing small-size accessories like wallets and business cards.

However, if your application involves working with large-sized sheets, a CNC machine with a large work area will be an ideal choice.

For example, woodworking applications often involve working with full-size plywood and MDF sheets, and therefore, 5x10 CNC routers will be an ideal choice for such applications.

Number of Axis/Degree of Freedom

5 Axis CNC Machine
CNC Machine with a 5-axis system

The number of axis or degrees of freedom of a CNC machine determines its ability to perform complex operations with quick cycle time.

A CNC machine with 2-axis has the flexibility to perform 2D machining operations in the XY plane, whereas a 3-axis CNC machine can perform 3D machining operations with variable depths.

CNC machines with greater axis systems/higher degrees of freedom (4, 5, or 6) can access the workpiece from different sides to perform complex 3D machining operations efficiently.

Generally, beginner or hobbyist level CNC machines have a 2 or 3-axis system, with an optional 4th-axis rotary kit upgrade.

Whereas 5 or 6-axes CNC machines are generally used in industrial applications where complex cuts are to be made with quick cycle time.

If you are a hobbyist or a small-scale business owner in need of CNC machined parts but do not have access to a CNC machine, you can always opt for outsourcing the job.

There are various online businesses that provide CNC machining services at reasonable rates.

You can also look for a CNC machining service near you. This will save time and money by eliminating the need to ship the product overseas.

These businesses take the design and other machining requirements from the user and provide an estimated quote for the machining process.

Furthermore, most CNC services also provide the feasibility of preparing the design as per customer requirements.

Therefore, you can get in touch with a CNC machining service provider, explain your requirement, and they'll design and machine the item as per your requirements.

Here are some popular online businesses that provide CNC machining services at reasonable rates.

Frequently Asked Questions (FAQ)

What is DNC?

Direct Numerical Control or Distributive Numerical Control (DNC) is an advanced form of CNC in which a single computer system is connected to multiple CNC machines. In this setup, a single computer controls the machining process on various CNC machines, thereby improving the coordination, portability, and productivity of the system.

Is 3D printing a CNC machining process?

No, 3D printing is not a CNC machining process because the term machining technically means removing the material from an existing product to give it the desired shape. Whereas 3D printing is an additive CNC manufacturing technique in which a product is made in the desired form by printing layers of material.

Is plasma cutting a CNC machining process?

Yes, plasma cutting can be a CNC machining process, provided that a CNC plasma cutter is used for machining. The machining process performed by traditional, hand-held plasma cutters is not considered as a CNC machining process.

About John

Hey I'm John. I talk about CNCs and Power Tools at Mellowpine. I'm a CNC hobbyist who has been making CNCs and writing about CNCs for a while. I currently also work as a consultant for business owners and hobbyists setting up their own CNCs. If you have any questions related to CNC, I'd be happy to answer them. Reach me at john@mellowpine.com

DIY Profile
John

Hey I'm John. I talk about CNCs and Power Tools at Mellowpine. I'm a CNC hobbyist who has been making CNCs and writing about CNCs for a while. I currently also work as a consultant for business owners and hobbyists setting up their own CNCs. If you have any questions related to CNC, I'd be happy to answer them. Reach me at john@mellowpine.com

Thanks for signing up.
Some error occured. Please try again.

Comments

The comments are closed.