Servo Motor & Encoder
Servo motor & encoder are the drive and the sense of a CNC machine’s axes — the motor that moves each axis and the measuring device that tells the control where the axis actually is. The whole promise of CNC rests on moving a tool to an exact position, and the pair that delivers it is the servo system. The servo motor is a special motor built to be commanded precisely: it turns the ball screw that drives the axis, and its speed and position are controlled continuously. But a motor turning is not the same as an axis being where the program wants it — the screw can wind up, the slides can drag, the motion can lag — so the machine adds the second half of the pair: the encoder, a sensor that measures the motor’s rotation, or the axis’s position, and reports it back to the control. The control compares where the axis should be with where the encoder says it is, and drives the motor to close the difference. This entry sets out what servo motors and encoders are, how the pair work together, and why that closed loop is the heart of CNC accuracy.
The motor that takes orders
The servo motor differs from an ordinary motor in what it is asked to do. An induction motor or a fan motor simply spins, at a speed set roughly by its supply; the axis motor of a CNC machine must spin to an exact speed, stop at an exact angle, reverse instantly, and hold its position against the cutting force that pushes the axis back. The servo motor is built for that service: it is a compact, powerful motor — often a brushless type with permanent magnets — whose torque can be commanded precisely and whose rotor carries the feedback device that reports its own position. It is paired with a servo drive or amplifier, an electronic unit that takes the low-power command signal from the machine’s control and delivers the high-power current that makes the motor produce exactly the commanded torque and speed. Command the drive, and the motor turns; command it to stop, and the motor holds. On the axis of a machine, the servo motor is bolted to the axis drive — turning the ball screw that moves the slide, or driving the spindle of a machining centre — and its controlled rotation, converted through the screw’s pitch, becomes the controlled linear motion of the axis that this wiki describes under axis drives.
The sense of position
But commanding the motor is only half the task, because the motor’s rotation does not guarantee the axis’s position. The ball screw has a pitch — each revolution moves the slide a fixed distance — but the screw winds under load, the nut has clearance, the slides have friction, and the whole chain of motor, coupling, screw and slide introduces error between what the motor did and where the axis went. To know where the axis actually is, the machine measures it, and the measuring device is the encoder. An encoder is an optical or magnetic sensor that produces a signal as it moves: the common rotary encoder, mounted on the motor shaft or the screw, counts the shaft’s rotation in fine divisions — thousands or more per revolution — and reports the angle; the linear encoder, mounted along the axis itself, reads a glass scale and reports the slide’s true position directly, free of any error in the screw. Either way the encoder turns the axis’s motion into numbers the control can read, and those numbers are the machine’s knowledge of where the tool is.
Closing the loop
The servo motor and the encoder meet in the closed loop — the control circuit that is the actual secret of CNC accuracy. The control holds the position the program commanded; the encoder reports the position the axis reached; and the control computes the difference between them — the following error — and drives the servo to remove it. If the axis lags behind the command because the cut loads it, the encoder sees the lag and the control commands more current, pushing the axis to catch up; if the axis overshoots, the control commands a brake; and when the axis has arrived, the control holds it there against the cutting force, the encoder confirming every instant that it has not drifted. The loop runs thousands of times a second, each pass comparing command to measurement and correcting, so the axis is continuously commanded to the exact position and continuously verified to be there. This is what distinguishes the CNC machine from the machine that simply moves: not that it can be told where to go, but that it can be told, checked and corrected until it is there, to the accuracy this wiki treats under accuracy and repeatability.
Why closed-loop control matters
The difference between a machine that measures its own motion and one that does not is the difference between a servo system and its simpler cousin, and it is worth making explicit. A stepper motor moves in fixed steps, counting its steps and assuming the axis went where each step commanded — an open loop that trusts the motor and is lost if a step is skipped under load. The servo’s closed loop never trusts: it commands, measures and corrects, so a momentary overload that would make a stepper lose its place is seen by the encoder and corrected, and the axis arrives where it was told regardless of the load that tried to stop it. That is why the axes of every serious machine — the machining centre, the lathe, the machines that this wiki describes as machine tools — are servo-driven and encoder-measured: the accuracy they hold is not the accuracy of a motor that steps hopefully but the accuracy of a loop that measures, corrects and confirms, thousands of times a second, until the tool is exactly where the program said it would be.
The servo system and the machine
The servo motor and the encoder are the working heart of the automatic machine, and they sit inside nearly every motion this wiki describes. When the program commands a feed, it is a servo that moves the axis; when it commands a spindle speed or a turret index or a tool change, it is servos that perform them; and the work coordinates the program addresses are real only because the encoders tell the control where the machine actually is. The servo system turns the program’s numbers into physical position, and it does it with the discipline this wiki treats across its machine entries — the machine tool is, in the end, a structure of slides and spindles, and the servo motor and encoder are what make those slides move and know where they are. A machine without them is a machine that can be directed but not trusted; with them, the axis is commanded, measured and corrected in a continuous loop, and the position that the program demanded and the encoder confirmed is the position where the tool cuts.