If you only remember one thing: a CNC controller is a pipeline that turns text into coordinated motion, and it runs in four stages. Most confusion about CNC comes from collapsing these stages into one black box. They aren’t one box.

1. Interpretation — reading the G-code

The controller parses the part program line by line into commands and modal state. “Modal” means a setting stays in effect until changed: a feed rate or a plane selection set on one line carries forward. The interpreter also tracks the active coordinate system and units. Get this layer wrong and everything downstream is confidently wrong.

2. Motion planning — deciding how to move

Raw commands aren’t directly executable; a machine can’t step instantly to a new speed without infinite acceleration. The planner looks ahead across many upcoming moves and fits a velocity profile that respects each axis’s acceleration and jerk limits, blends cornering where allowed, and keeps the tool on path. This look-ahead is why a controller can run a tight contour at speed without stuttering at every segment boundary.

3. Interpolation — generating setpoints

The planned moves are sampled into a dense stream of fine position setpoints, one per control cycle, for every axis at once. Linear and circular interpolation are the common cases; the output is the per-axis target the servo loop will chase this cycle.

4. The servo loop — closing the loop in real time

A hard real-time loop compares each axis’s commanded position to its measured position (from an encoder) and drives the motor to close the error, every cycle. This is where “real time” is non-negotiable: the loop must hit its deadline every single cycle, or the motion is wrong.


Why lay it out this way? Because almost every interesting question — can AI help here? where does latency matter? what makes a controller “good”? — only makes sense once you know which stage you’re talking about. An LLM might help you reason about stage 1 or diagnose stage 4, but it has no business inside stage 4. More on that in the writing on AI × CNC.