Roymech engineering encyclopedia

CNC Machine Tools and Manufacturing Automation


Manufacturing automation uses control systems, sensors, drives and software to operate machinery and production equipment with reduced dependence on continuous manual intervention. CNC (Computer Numerical Control) is one of the most important applications of automation in manufacturing and is used to control machine tools such as lathes, milling machines, machining centres, grinding machines and many other production systems.

Modern CNC machines combine programmed motion with servo drives, position measurement, tooling systems and machine-control functions. They may also be integrated with probing, automatic tool changing, robots, material handling and production-management systems.

Why Manufacturing Processes Are Automated

Automation can be introduced for many reasons. The benefit depends on the production process and should not be judged solely by whether an operator has been removed from a particular task.

Potential advantages include:

  • Improved repeatability
  • Reduced dependence on continuous manual intervention
  • Consistent execution of programmed operations
  • Higher production rates
  • Reduced handling time
  • Improved control of complex machine movements
  • Integration of inspection and process monitoring
  • Improved traceability and production data collection
  • Ability to manufacture complex geometry
  • More effective use of unattended or lightly attended production

Automation also introduces costs and engineering requirements. Equipment, programming, tooling, maintenance, guarding, sensors and integration must all be considered. A highly automated process is not automatically the most economical solution for every production requirement.

Basic Elements of an Automated Machine

An automated manufacturing system can be considered in terms of several basic functions.

Element Function
Input Instructions and information defining the required operation. In a CNC machine this includes the part program together with machine, tool and workpiece data.
Controller Processes instructions and machine information and generates commands for the machine systems.
Drives and actuators Produce the required physical movement or action. Examples include servo motors, spindle drives, hydraulic actuators and pneumatic actuators.
Sensors Measure machine or process conditions such as position, speed, pressure, temperature, tool presence or workpiece position.
Feedback Returns measured information to the control system so that actual machine behaviour can be compared with the commanded condition where required.
Output The resulting machine movement, manufactured component, handling operation or other controlled action.
Human-machine interface Allows operators, setters and programmers to enter information, monitor machine status, diagnose faults and control machine functions.

Feedback and Automatic Control

Feedback is an important principle in machine automation. A commanded condition can be compared with a measured condition and the resulting difference used by the control system to influence the machine.

For example, a CNC axis may be commanded to move to a particular position. A position-measuring system provides information about the actual axis position, allowing the control system to determine whether the required movement has been achieved.

Not every automated function uses feedback in the same way. Some functions operate from predetermined commands or sequences, while others form part of closed-loop control systems which continuously respond to measured conditions.

Open-Loop and Closed-Loop Control

Control systems are commonly described as open-loop or closed-loop.

Control type Principle
Open-loop control The controller commands an action without using direct feedback of the controlled output to correct the command. Stepper-motor systems are a common example of where open-loop positioning may be used.
Closed-loop control The actual controlled condition is measured and fed back to the controller. The controller uses the difference between commanded and measured conditions to control the system.

Modern CNC machine tools commonly use servo-controlled axes with position feedback. Depending on the machine design, feedback devices may include rotary encoders, linear measuring systems or other position sensors.

Numerical Control, NC and CNC

Numerical Control (NC) is the control of machine operations using coded numerical instructions. Early NC systems were developed before the widespread use of modern digital computers and frequently used punched media to store and transfer programs.

Computer Numerical Control (CNC) uses a computer-based controller to interpret the part program and coordinate the functions of the machine. The term CNC now covers a very wide range of equipment, from relatively simple machines to multi-axis machining centres and highly automated production systems.

The controller coordinates functions such as:

  • Axis position and movement
  • Feed rate
  • Spindle speed and direction
  • Tool selection and tool changing
  • Coolant and auxiliary functions
  • Work and tool coordinate systems
  • Machining cycles
  • Machine interlocks
  • Program execution

DNC and Networked CNC Machines

Historically, DNC has been used for systems in which computers communicate with or manage multiple numerically controlled machine tools. The meaning has evolved as CNC equipment and factory networks have developed, and the term may be encountered as either Direct Numerical Control or Distributed Numerical Control depending on the system and historical context.

Modern CNC programs and production information can be transferred using computer networks and manufacturing information systems. The exact architecture depends on the machine controller, factory infrastructure and production-management system.

Applications of CNC

Numerical control is used far beyond the traditional milling machine or lathe. Typical manufacturing applications include:

  • CNC lathes and turning centres
  • Milling machines
  • Vertical and horizontal machining centres
  • Drilling and boring machines
  • Grinding machines
  • Electrical discharge machining (EDM)
  • Laser, plasma and other profile-cutting machines
  • Sheet-metal punching and forming equipment
  • Tube and pipe processing machines
  • Special-purpose production machinery
  • Coordinate-controlled inspection equipment

CNC Machine Coordinate System

CNC machine movements are normally described using a Cartesian coordinate system. Linear axes are conventionally identified as X, Y and Z, while rotary axes associated with rotation about the X, Y and Z directions are identified as A, B and C respectively.

The exact physical direction and available axes depend on the machine configuration.

On many machine tools the Z axis is associated with the principal spindle axis, but programmers should work from the coordinate conventions and documentation applicable to the particular machine.

Linear and Rotary Axes

A basic CNC machine may have two or three controlled linear axes. More advanced machines can incorporate additional rotary and linear axes.

Axis General description
X Linear movement in the X direction.
Y Linear movement in the Y direction.
Z Linear movement in the Z direction, conventionally associated with the principal spindle direction on many machine tools.
A Rotary movement about the X axis.
B Rotary movement about the Y axis.
C Rotary movement about the Z axis.

Additional axes and machine-specific arrangements are possible. A multi-axis machine therefore needs to be understood from its actual kinematic arrangement rather than simply from the number of axes quoted in its description.

Point-to-Point and Continuous-Path Control

Different manufacturing operations require different degrees of control over the path followed between programmed positions.

Point-to-Point Positioning

In point-to-point operation the important requirement is to position the tool or workpiece at specified locations. The exact cutting path between those locations may not be important.

Drilling a pattern of holes is a typical example. The machine moves to the required hole position before performing the drilling operation.

Linear Interpolation

Linear interpolation coordinates the required machine axes so that the tool follows a straight path between programmed positions at the commanded feed rate.

Circular Interpolation

Circular interpolation coordinates two machine axes to generate a circular or arc-shaped tool path in a selected plane.

Continuous-Path Machining

Continuous-path control coordinates machine axes throughout the cutting movement. It allows contours and complex geometry to be produced using simultaneous controlled axis motion.

Modern multi-axis CNC machines can coordinate several axes simultaneously, subject to the capabilities and kinematics of the particular machine and controller.

Machine Position, Work Coordinates and Datums

CNC machining requires a clear distinction between the machine's own reference system and the coordinate system used to define the component.

The machine establishes its own positional reference through the machine control and reference procedure. A work coordinate system is then established so that programmed component dimensions relate correctly to the actual workpiece position.

The choice of workpiece datum should normally relate sensibly to the component drawing, workholding arrangement and manufacturing sequence. Poor datum selection can make programming, inspection and subsequent operations unnecessarily difficult.

Tool Length and Tool Offsets

Different cutting tools have different lengths, diameters, nose radii and other geometrical characteristics. CNC controls therefore use tool-offset information so that a program can work from defined component geometry without requiring every tool to have identical physical dimensions.

Depending on the machine and operation, offsets may include:

  • Tool length
  • Tool radius or diameter
  • Turning-tool geometry
  • Tool nose radius
  • Wear compensation

Incorrect tool-offset information can produce dimensional errors or collisions even when the programmed tool path itself is correct.

CNC Program Structure

A CNC part program consists of coded instructions interpreted by the machine controller. A program is divided into blocks, with each block containing one or more words or commands.

In the widely used word-address approach, a letter identifies the function of the numerical information which follows it.

Address Typical purpose
N Block or sequence identification.
G Preparatory or machining-control function.
X, Y, Z Linear coordinate information.
A, B, C Rotary-axis coordinate information where applicable.
I, J, K Parameters used for particular interpolation functions on applicable controllers.
F Feed command.
S Spindle-speed command.
T Tool selection or identification.
M Miscellaneous or auxiliary machine function.

Representative G-Codes

G-codes are preparatory functions used to specify machining and motion conditions. Some codes are widely encountered across many CNC controls, but their exact behaviour and associated parameters must still be checked against the applicable controller documentation.

Example Commonly encountered purpose
G00 Rapid positioning.
G01 Linear interpolation at a programmed feed.
G02 Circular interpolation in one direction.
G03 Circular interpolation in the opposite direction.
G17 XY plane selection on commonly encountered controls.
G18 ZX plane selection on commonly encountered controls.
G19 YZ plane selection on commonly encountered controls.
G40 Cancellation of cutter compensation on commonly encountered controls.
G41 / G42 Cutter compensation functions on commonly encountered milling controls.
G90 Absolute programming mode on commonly encountered controls.
G91 Incremental programming mode on commonly encountered controls.

This short table deliberately does not attempt to provide a complete G-code reference. Canned cycles, coordinate systems, compensation, probing, turning functions and advanced machining functions vary with controller and machine configuration.

Representative M-Codes

M-codes are generally associated with auxiliary machine functions rather than defining the geometrical cutting path.

Example Commonly encountered purpose
M00 Program stop.
M01 Optional stop.
M03 Spindle operation in one programmed direction.
M04 Spindle operation in the opposite programmed direction.
M05 Spindle stop.
M06 Tool-change function on many machining controls.
M08 Coolant function on many controls.
M09 Coolant off on many controls.
M30 Program-end/reset function on many controls.

Absolute and Incremental Programming

Coordinate positions may be programmed using absolute or incremental methods.

With absolute programming, positions are specified relative to an established coordinate origin. This can make component geometry relatively easy to relate to drawing dimensions where the drawing uses a suitable datum system.

With incremental programming, a movement is specified relative to a previous or current position rather than directly from the principal origin.

Both methods can be useful. The correct interpretation depends on the programming mode and controller being used.

Feed Rate

The programmed feed determines the commanded rate at which cutting motion takes place. Depending on the machine, controller and active programming mode, feed may be expressed as a linear distance per unit time, a distance per spindle revolution or another defined feed mode.

The programmer must therefore understand both the numerical feed value and the active feed mode. A numerical value without its programming context does not completely define the cutting condition.

See the individual Turning, Milling and Drilling pages for the machining principles associated with cutting speed and feed.

Spindle Speed

The CNC controller can command spindle operation and speed, but the appropriate spindle speed must still be selected from the cutting requirements of the tool and workpiece.

For rotating cutting or workpiece motion, the relationship between cutting speed, effective diameter and rotational speed remains an engineering calculation regardless of whether the machine is manually controlled or CNC controlled.

Automation therefore controls the selected machining parameters; it does not remove the need to select appropriate parameters.

Automatic Tool Changing

Machining centres and other CNC machines can use automatic tool-changing systems to select different cutting tools during a program without manual tool replacement between operations.

Tools are stored in a magazine, carousel, chain or other storage system. The machine identifies the required tool and transfers it between the storage position and spindle or tool station.

Automatic tool changing allows a component to undergo operations such as milling, drilling, boring, tapping and finishing during a single machine setup.

CNC Turning Centres

A CNC turning centre develops the basic principles of the lathe by adding programmable axis control, automatic tool indexing and other automated functions.

Depending on machine configuration, turning centres may incorporate driven tools, additional spindles and additional controlled axes. This can allow turning, drilling and milling-type operations to be combined within one machine.

See: Turning and Lathe Machining .

CNC Machining Centres

A machining centre combines programmable axis motion with automatic tool changing and a range of machining functions. Vertical and horizontal configurations are common, while more advanced machines incorporate additional rotary axes.

The ability to machine several faces or features from a single setup can reduce workpiece handling and cumulative setup error.

Five-axis machining is particularly useful where tool orientation must be controlled relative to complex component surfaces or where several sides of a component need to be reached without repeated manual repositioning.

However, additional axes increase programming, simulation, workholding and collision-avoidance requirements. More axes do not automatically make a process better if the component does not require them.

Probing and Measurement

Modern CNC machines may incorporate touch probes, tool setters and other measurement systems.

Workpiece probing can be used for functions such as:

  • Establishing workpiece position
  • Locating datums
  • Checking setup orientation
  • Measuring selected machined features
  • Supporting process adjustment

Tool measurement systems can establish tool length or diameter and can also assist with detecting tool damage or wear depending on the system.

CAD/CAM and CNC Programming

Simple CNC operations can be programmed manually, but complex components are commonly programmed using Computer-Aided Manufacturing (CAM) software. Component geometry may be obtained from a CAD model and used to develop machining operations and tool paths.

A typical CAD/CAM workflow can include:

  1. Create or import the component geometry.
  2. Define the stock material.
  3. Define the workpiece coordinate system.
  4. Select the machine and machining strategy.
  5. Select cutting tools and holders.
  6. Define machining parameters.
  7. Generate tool paths.
  8. Simulate or verify the machining operation.
  9. Post-process the tool path for the required CNC controller.
  10. Transfer and prove the program on the machine using an appropriate procedure.

Post-Processors

CAM software normally generates an internal description of the required tool motion. A post-processor converts this information into CNC program instructions suitable for a particular machine and controller combination.

This is an important distinction because the same component and CAM tool path may require different output for different machine tools.

Program Verification and Prove-Out

Before a new or modified CNC program is used for normal production it should be verified using procedures appropriate to the machine and workplace.

Verification may include:

  • Checking work and tool offsets
  • Reviewing tool numbers and tool data
  • Checking spindle and feed commands
  • Simulation
  • Collision checking
  • Checking workholding and clearances
  • Controlled prove-out of the program
  • Inspection of the first component

Automatic Material Handling

Automation can extend beyond the cutting process to the movement of raw material, workpieces, tools and finished components.

Material-handling systems can include:

  • Industrial robots
  • Gantry loaders
  • Bar feeders
  • Pallet systems
  • Conveyors
  • Automatic storage and retrieval systems
  • Automated guided vehicles (AGVs)
  • Autonomous mobile robots (AMRs)

The handling system must be integrated with the machine and production process so that loading, clamping, machining, unloading and fault conditions are coordinated correctly.

AGVs and Autonomous Mobile Robots

Automated Guided Vehicles have long been used to transport material around manufacturing facilities. Traditional AGVs may follow predefined routes using physical or electronic guidance systems.

More recent autonomous mobile robots can use onboard sensing, mapping and navigation systems to operate with greater flexibility within an appropriately designed environment.

The distinction between particular vehicle technologies is less important to process design than ensuring that the transport system provides the required payload, positioning, availability, safety and integration with the manufacturing operation.

Robotic Machine Loading

Industrial robots and gantry systems can load and unload CNC machine tools. A robot may transfer a raw component into a fixture, initiate or coordinate with the machining cycle, and remove the completed component.

Successful automated loading requires more than simply adding a robot. The complete process must provide reliable:

  • Part presentation and orientation
  • Gripping
  • Workpiece location
  • Clamping confirmation
  • Machine communication
  • Door or access control
  • Finished-part handling
  • Fault recovery

Flexible Manufacturing

CNC machines can be combined with automatic tool storage, pallet handling, robots and computer-controlled production systems to manufacture different components with reduced manual intervention between jobs.

The ability to change programs and tooling allows CNC automation to provide greater product flexibility than traditional dedicated automation in many applications.

However, the economics depend on component variety, production quantity, setup requirements, equipment utilisation and the cost of developing and maintaining the automated system.

Unattended Machining

Some CNC systems are capable of operating for periods without continuous operator attendance. Successful unattended machining requires a process which can remain stable when nobody is present to make routine manual corrections.

Important considerations include:

  • Tool life and tool-breakage detection
  • Chip control and evacuation
  • Coolant management
  • Reliable workpiece loading and clamping
  • Tool availability
  • Process monitoring
  • Fault detection
  • Safe machine shutdown when a fault occurs

Designing Components for CNC Machining

CNC control can produce complex tool paths, but component geometry should still be designed with the manufacturing process in mind.

Useful considerations include:

  • Provide practical tool access.
  • Avoid unnecessarily deep and narrow features.
  • Use internal corner radii compatible with available cutters.
  • Provide suitable surfaces for workholding where possible.
  • Select datums which support manufacture and inspection.
  • Avoid unnecessarily tight tolerances.
  • Consider how many setups and component orientations are required.
  • Consider toolholder as well as cutter clearance.
  • Allow for inspection of important features.

A component being manufactured on CNC equipment is not automatically optimised for CNC manufacture. Design for manufacture remains important regardless of the sophistication of the machine tool.

Automation and Process Capability

Automation is particularly effective at repeating a defined process. Consequently, the underlying process must first be capable of producing the required result.

If a machining operation suffers from poor workholding, excessive tool deflection, unstable cutting conditions or unsuitable datum selection, automating the operation may simply reproduce the problem more consistently.

Historical Development of CNC Data Input

The method used to store and transfer numerical-control programs has changed considerably during the development of NC and CNC machine tools. Early systems used punched tape, followed by technologies such as magnetic media and floppy disks on later equipment.

Modern CNC systems generally use digital storage and electronic data transfer, although older machine tools using earlier media can still be encountered in industry.

The historical progression is useful because it explains terminology still encountered in CNC documentation and older manufacturing literature. The fundamental idea has remained the same: a machine executes a defined sequence of coded manufacturing instructions even though the method used to store, transfer and process those instructions has changed radically.

Related Machining Processes

Further Engineering Resources

The following external resources were included on the original RoyMech page and are retained for further reference. Some are historical links and can be checked as part of the RoyMech external-link review.

  1. Gudel
    Gantry and automation equipment information.
  2. CNC Concepts
    CNC training and application material.
  3. CAD/CAM/CNC Glossary
    Legacy CNC terminology resource retained from the original RoyMech page.
  4. Promot Machine Tool Automation
    Legacy machine-tool automation resource retained from the original page.
  5. Wikipedia - Numerical Control
    General background information on numerical control and CNC development.