Motion control
Open-loop, closed-loop & servo — how CNC motion really works
The single biggest decision in a CNC drivetrain is how the machine knows where it is. Three approaches, from cheapest to most capable. Each one below has a live simulation — run it, apply a cutting load, and watch what happens to the commanded position versus where the axis actually ends up.
These run on HTML5 Canvas, drawn in real time in your browser. Flash reached end-of-life in 2020 and Java applets were removed from every browser years ago — Canvas is the modern, plugin-free way to do this, and it works on phones too.
Open-loop stepper
The controller sends a train of step pulses; the driver energises the motor's coils and the rotor advances one fixed step per pulse. There is no feedback — the controller simply assumes the motor obeyed. It's cheap, simple and precise at rest.
The catch: if a cut demands more torque than the motor is producing, the rotor slips — it loses steps — and nothing tells the controller. The commanded position marches on while the axis falls behind, and the error is permanent until the next homing. Hit Apply cutting load and watch the green axis stall behind the blue target.
Lost steps: 0
Closed-loop stepper
The same stepper, now with an encoder on the shaft. Every cycle the controller compares where the axis actually is against where it was told to be, and if there's an error it pushes extra current to catch up. You get the low cost and high holding torque of a stepper, with the reliability of feedback.
Apply the same load: the axis lags for a moment, the loop sees the error and corrects, and no steps are lost. It also runs cooler and quieter because it only draws the current it needs.
Following error: 0.0 mm · corrected
Servo control
A servo pairs a smooth brushless (or AC) motor with an encoder and a continuous PID loop. Instead of fixed steps it commands torque continuously, so it accelerates hard, holds full torque at speed, and follows a trajectory smoothly. It's the most capable — and the most expensive — option.
Under load it barely flinches: the loop rejects the disturbance with a small, damped response. The trade is cost and tuning. Watch the green axis track the blue target almost perfectly, with a tiny settle after each reversal.
Peak error: 0.0 mm · smooth
Side by side
| Open-loop stepper | Closed-loop stepper | Servo |
|---|
Which one for your machine?
On a Roboda build the controller is the same H743 grblHAL board either way — what changes is the motor + feedback you pair with it: