What CNC is and how it differs from conventional machining, how the lathe and the milling machine work, the basics of G/M code, cutting parameters, tolerances and safety at the machine.
The brands that build the machines and CNC controls of the trade. Twelve are Spanish: Danobat, Nicolás Correa, Soraluce, Zayer, Ibarmia, CMZ…
See the manufacturers →The CNC lathe and milling machine are machine tools governed by a computer numerical control: a computer that runs a program (G/M code) to move the axes with repeatable precision. The lathe spins the workpiece and shapes geometries of revolution; the milling machine spins the tool and machines surfaces, slots and contours. Compared with manual machining, CNC brings repeatability, complex geometries and fine tolerances: standard CNC turning reaches roughly IT7 quality.
CNC stands for Computer Numerical Control. It is a system in which a computer built into the machine reads a program and translates it into precise movements of the axes and the tool. Instead of an operator manually turning the handwheels and feeds, the control interprets numerical instructions and coordinates motors, spindles and measuring systems to reproduce the part described in the drawing.
CNC is the evolution of numerical control (NC), which appeared in the mid-20th century, when the computer was built into the machine itself. Today most professional lathes and milling machines are numerically controlled, although conventional (manual) machines are still used for one-off parts, repairs and training.
On a conventional machine, the machinist directly controls the movements by turning cranks and watching the dimensions with the caliper or the micrometer. Precision and repeatability depend largely on their skill. On a CNC machine, those movements are carried out by the control following the program, which brings three clear advantages:
In return, CNC requires preparation up front: programming, simulating, setting up (the setup) and checking the first part before running the batch.
Although both are chip-removal machines, they differ in what spins and in the type of part they produce.
On the lathe, the workpiece spins held in the chuck (or between centres) and the cutting tool, fixed in the turret, advances against it. This generates revolution shapes: shafts, bushings, threads, cones and cylindrical grooves. A basic CNC lathe works with two main axes:
More advanced lathes add driven tools and a C axis for milling operations on the turned part (the so-called turning centres).
On the milling machine, the opposite happens: the tool spins in the spindle and the workpiece stays clamped on the table while the axes move it under the cutter. It is used to machine flat surfaces, pockets, slots, holes and contours. A typical CNC milling machine works with three linear axes:
4- and 5-axis machining centres add rotary axes that make it possible to orient the workpiece or the tool to machine complex geometries in a single setup.
The program a CNC runs is written in a language popularly known as G-code. It is organised into lines (blocks), each with instructions. The G (preparatory) functions define movements and working modes; the M (auxiliary or miscellaneous) functions control machine actions such as starting the spindle, turning on the coolant or ending the program. There is a standardised base (historically set out in standards such as ISO 6983), but each control manufacturer introduces variants, so it is always advisable to check the machine's manual.
The CNC orients itself using a coordinate system. There is a machine zero, fixed, defined by the manufacturer, and a work zero (work origin), which the operator sets on the workpiece itself. All the program's coordinates are referenced to that work zero, so the programmer can think in terms of the drawing's geometry rather than the machine's physical position. Movements can be programmed in absolute mode (all dimensions relative to the origin) or incremental mode (relative to the previous point).
G00 — rapid positioning: the tool moves at maximum traverse speed, without cutting. Used to approach and retract.G01 — linear interpolation: movement in a straight line at the programmed feed rate; it is the straight cut.G02 — clockwise circular interpolation.G03 — counterclockwise circular interpolation.Alongside them, addresses such as F (feed), S (spindle speed) and T (tool) are used, together with common M functions such as M03/M04 (spindle rotation), M08 (coolant) and M30 (end of program).
A simple milling fragment in absolute mode. The values are illustrative: in practice they depend on the material, the tool and the machine.
% (start of program) G21 (units in millimetres) G90 (absolute coordinates: relative to the work zero) G17 (XY working plane) T01 M06 (select and change to tool 1) S1200 M03 (spindle at 1200 rpm, clockwise rotation) G00 X0 Y0 (rapid to the origin, without cutting) G00 Z5 (safety height, 5 mm above the workpiece) G01 Z-2 F100 (descend to -2 mm depth, feed 100 mm/min) G01 X40 F250 (straight cut to X40, feed 250 mm/min) G00 Z5 (retract to safety height) M05 (stop the spindle) M30 (end of program)
The result of a machining job depends as much on the program as on the tool and the cutting parameters chosen. Tools (carbide inserts, drills, cutters, taps) are selected according to the material to be machined and the operation. On top of that, three parameters are fundamental:
The specific values are provided by the tool manufacturers in their tables and catalogues, and are adjusted at the machine by watching the chip, the noise, the vibrations and the finish. There is no universal number: they depend on the material, the tool and the rigidity of the setup.
No part comes out with a perfect dimension: there is always a tolerance, the allowable margin between a maximum and a minimum value. In machining you work with very small magnitudes, on the order of hundredths of a millimetre (0.01 mm) and, in precision work, of microns (0.001 mm). To classify dimensional precision, the ISO quality grades are used, designated as IT (for example IT6, IT7, IT10): the lower the number, the higher the precision.
Standard CNC turning habitually reaches the IT7 quality range, while milling usually sits in a somewhat broader range, around IT10–IT13. In other words, all else being equal, turning tends to offer higher dimensional precision. These ranges are indicative: the real precision depends on the machine, the tool and the process.
To verify dimensions, metrology instruments are used: vernier caliper, micrometer, dial indicator, gauges and, in quality control, coordinate measuring machines (CMM). Measuring well is as important as machining well: a dimension out of tolerance turns a good part into scrap.
CNC automates the movement, but the workshop is still a hazardous environment: workpieces and tools spinning at high speed, hot and sharp chips, cutting fluid and live edges. Some widely recommended basic practices:
These recommendations are general; each company must follow its own risk assessment and the specific instructions for each machine.
Frequently asked questions
CNC stands for Computer Numerical Control. It is the system by which a computer built into the machine runs a program and translates its instructions into precise movements of the axes and the tool, instead of being operated manually.
On the lathe the workpiece spins and the tool advances against it, producing revolution shapes (shafts, bushings, threads). On the milling machine the tool spins while the workpiece stays clamped on the table, which allows surfaces, pockets, slots and contours to be machined. The basic lathe works with X and Z axes; the milling machine, with X, Y and Z.
G-code is the language used to program the CNC. Its G (preparatory) functions define movements such as rapid positioning (G00), linear interpolation (G01) or circular interpolation (G02/G03), while the M functions control auxiliary machine actions, such as starting the spindle or the coolant. There is a standardised base, but each control can have variants.
Standard CNC turning habitually reaches the ISO IT7 quality range, with tolerances on the order of hundredths of a millimetre. Milling usually sits in a somewhat broader range (approximately IT10–IT13). These are indicative values: the real precision depends on the machine, the tool and the process.
Keep learning
Continue with the trade, the training and the pay of machining.
Real duties, day-to-day life in the workshop and types of machining.
Read the guide →Intermediate-level vocational training, what you study and how to get into the sector.
See the path →Ranges by experience and role, including the CNC programmer.
See salaries →Go back to the complete guide to the machinist trade.
Go to the homepage →One practical workshop, CNC or metrology idea per week. No spam: only what you would use at the machine.
✅ Thank you! We will write to you soon. (Demo: the email provider is not connected yet.) Free. You can unsubscribe whenever you want. Learn more about the newsletter.