Machine Controller

Machine Tools|Process Desk|

Machine controller — the CNC control — is the computer that runs a CNC machine, and everything the machine does passes through it. The machine tool provides the structure, the slides and the spindle; the part program says what to make; but the controller is the brain in between that reads the program, works out what it means, and drives the machine’s servo motors to do it. It is the difference between a machine and a CNC machine: give a machining centre a program and no controller, and nothing moves; connect the controller, and the program becomes motion — the axis commands, the spindle speeds, the tool changes, the whole coordinated sequence of the cut. The controller is also the operator’s window on the machine: the screen and the keypad where the program is loaded, the offsets are set and the cycle is started and watched. This entry sets out what a machine controller is and what it actually does between reading a program and cutting a part.

The brain of the machine

The machine controller is a specialised computer, and it is built for one demanding job: controlling motion in real time. At its heart is the processor that runs the machine’s software, but what makes a controller a controller is the rest of it — the electronics that talk to the machine’s parts. It sends the command signals to the servo drives that move the axes, through the amplifiers this wiki describes under servos; it receives the position feedback from the axes’ encoders; it commands the spindle’s speed and direction; it switches the machine’s auxiliary devices — the coolant, the tool changer, the guards — through their programmed M codes; and it listens to the machine’s safety interlocks and limit switches, refusing to move a slide that is not clear or a spindle that is not ready. The controller is thus the machine’s nervous system as much as its brain: every command the machine obeys comes from it, and every measurement the machine makes returns to it. Around that core sits the operator interface — the screen, the keypad, the handwheel — where the human talks to the machine.

What the controller does with a program

The controller’s central act is turning a program into motion, and it happens in a disciplined sequence for every line of code. First it decodes the block — the line of program this wiki treats under reading a program block — working out which axis words and speeds it contains and what they mean. Then it interpolates: for a move from one point to another, it computes the path between them, dividing a straight cut or a circular arc into the fine increments the axes can follow, and planning the feed so the tool moves at the commanded rate along that path. Then it commands: it sends each axis its position at each increment, thousands of times a second, and the servo system carries the axis there, the controller checking the encoder feedback and correcting as it goes. And it sequences: it starts the spindle, turns on the coolant, calls the tool change, and times every action so the machine moves only when it is safe and ready. The controller performs this loop — decode, interpolate, command, sequence — for every block of the program, hundreds or thousands of times in a part, which is why the program that a machinist writes is turned by the controller into the seamless, coordinated cut.

Planning ahead

A modern controller does not read one block at a time and wait; it reads ahead, and the look-ahead is a large part of modern machining quality. The controller examines the coming blocks of the program and looks ahead, planning the tool path across many moves at once, so it can keep the feed rate up through direction changes and round the corners of a contour rather than stopping at each block boundary. It also smooths the path, blending one move into the next within the tolerance the program allows, so the machine flows through a complex pocket or a sculptured surface at speed instead of lurching from point to point. The result shows in both speed and finish: a controller with deep look-ahead cuts a contoured part faster, because it never stops to think, and with a better surface, because it never hesitates and gouges. The controller’s planning power — how many blocks it looks ahead, how finely it interpolates, how smoothly it blends — is one of the real differences between an entry-level machine and a precision one, and it is why the same program can cut differently on different machines.

The operator’s window

The controller is also the face the machinist works with, and its interface is where the human part of CNC machining happens. Through the screen and keypad the operator loads the program, sets the work coordinates and the tool offsets, and stores the tool data that the program calls; through its modes the operator chooses automatic running or manual jogging with the handwheel, and proves the program with the dry run before it cuts. During the cut the controller’s screen shows what the machine is doing — the current block, the axis positions, the spindle speed and feed — and its overrides let the operator slow the feed or stop the cycle the instant something looks wrong. The controller thus carries the conversation between the machinist and the machine: the machinist tells it what to make and watches it do it, and the controller obeys precisely, reports faithfully and refuses what is unsafe, in the same spirit this wiki treats under machine safety.

The controller and the machine

The machine controller is what makes a machine tool a CNC machine tool, and its quality sets the quality of the machining as surely as the iron does. The structure provides the rigidity, the servos the motion, but it is the controller that decides how accurately those servos are commanded, how smoothly the path is interpolated, and how faithfully the program is executed — the accuracy and the finish of the part are as much the controller’s work as the machine’s. Different controllers speak the same G-code but do their interpolation and their look-ahead differently, and a shop’s choice of controller — on the machining centre or the lathe — shapes how its machinists program and run the machines every day. The controller completes the machine this wiki describes: the iron that holds, the servos that move, and the controller that thinks — the brain that reads the program, plans the path and drives the axes, turning the code that the programmer wrote into the chips that the machine cuts.

Related