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.
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:
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.
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 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.
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) 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:
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.
Numerical control is used far beyond the traditional milling machine or lathe. Typical manufacturing applications include:
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.
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.
Different manufacturing operations require different degrees of control over the path followed between programmed positions.
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 coordinates the required machine axes so that the tool follows a straight path between programmed positions at the commanded feed rate.
Circular interpolation coordinates two machine axes to generate a circular or arc-shaped tool path in a selected plane.
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.
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.
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:
Incorrect tool-offset information can produce dimensional errors or collisions even when the programmed tool path itself is correct.
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. |
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.
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. |
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.
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.
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.
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.
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 .
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.
Modern CNC machines may incorporate touch probes, tool setters and other measurement systems.
Workpiece probing can be used for functions such as:
Tool measurement systems can establish tool length or diameter and can also assist with detecting tool damage or wear depending on the system.
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:
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.
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:
Automation can extend beyond the cutting process to the movement of raw material, workpieces, tools and finished components.
Material-handling systems can include:
The handling system must be integrated with the machine and production process so that loading, clamping, machining, unloading and fault conditions are coordinated correctly.
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.
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:
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.
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:
CNC control can produce complex tool paths, but component geometry should still be designed with the manufacturing process in mind.
Useful considerations include:
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 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.
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.
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.