GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

CNC control architecture

What parts CNC system software generally includes

A control is not one program. It is a stack of tasks running at different speeds, from G-code parsing down to a 1 kHz current loop. This page explains what parts CNC system software includes and what each layer decides about your part. Written for engineers and buyers who have to judge a machine or debug a process, not just run it.

±0.005 mm tolerance16 five-axis centersISO 9001 / IATF 16949
What parts CNC system software includes on a 5-axis machining center
The stack

What parts CNC system software includes at each layer

A CNC control is a real-time computer with a hard deadline. Miss the deadline and the axis lags, the surface tears, or the tool breaks. That deadline is why the software is split into layers with different cycle times rather than written as one loop. The top layer can take milliseconds. The bottom layer gets microseconds.

Each layer speaks to the one below it through a small, fixed interface. The interpreter hands the planner a stream of motion requests. The planner hands the servo loop a position setpoint every interpolation cycle, typically 1 ms. The servo loop then drives the amplifier. Nothing skips a level, and that is deliberate: a bug at one layer cannot silently corrupt the layer above it.

For a machinist this matters because symptoms point at a layer. A wrong feature size is usually a CAM or offset problem, not a control problem. Chatter at a specific feed rate is often planner or servo tuning, not G-code. Knowing the split shortens the argument about whose problem it is.

On our own 16 simultaneous 5-axis centers, the control stack is what lets a rotary table hold Ø400 mm parts to ±0.005 mm while the tool tip travels along five axes at once. The software does the compensation. The operator sets the strategy.

  • 1
    InterpreterReads ISO code, macros and canned cycles into internal motion blocks.
  • 2
    PlannerLooks ahead, limits acceleration and jerk, decides the velocity profile.
  • 3
    Servo loopRuns the position and current loops, closes the encoder feedback.
  • 4
    PLC logicHandles tool changer, coolant, door, pallet and safety interlocks.
Mechanics

How the interpreter and planner shape the cut

The interpreter turns text into motion. It resolves modal states, applies tool length and radius offsets, expands canned cycles, and evaluates macro variables. Most mistakes blamed on the control actually start here: a stale offset, a modal G-code left active from the previous tool, a cutter compensation direction applied on the wrong side.

The planner is where surface quality is decided. It reads ahead a configurable number of blocks, then chooses a velocity profile that respects each axis acceleration limit. Look-ahead of 20 to 200 blocks is common on milling controls. Short look-ahead on a model with many tiny segments produces stop-start motion, visible as witness marks on the flank of the part.

Jerk limiting is the other lever. Without it, acceleration changes instantly at block boundaries and the machine rings. With it, corner velocity drops slightly but the surface reads cleaner. For finishing passes at Ra 0.8–1.6 μm we usually accept the slower corner and keep the feed steady.

One practical rule: if the part is geometrically right but the finish is banded, suspect the planner and servo tuning before you touch the CAM file. If the geometry is wrong but the finish is consistent, the problem is upstream in the program.

  • 1
    Check offsets after every setupA single wrong tool length moves every feature on that tool.
  • 2
    Match look-ahead to segment sizeFine tessellated models need more blocks of look-ahead.
  • 3
    Keep feed steady near cornersSudden feed changes show up as marks on the wall.
Closing the loop

The servo loop and what feedback can and cannot fix

The servo loop compares commanded position with encoder feedback, then computes a velocity and current command. Position loop bandwidth on a typical machining center sits in the tens of hertz. The current loop underneath it runs at 1 to 16 kHz. That ratio is not an accident. It lets the fast inner loop hide motor electrical dynamics from the slower outer loop.

Following error is the gap between commanded and actual position during motion. It is normal and nonzero. What matters is whether it stays inside the tolerance budget. On a finish pass at 2,000 mm/min, a following error of 0.01 mm will show in the part; the same value during a roughing pass at 500 mm/min will not.

Feedback cannot fix what the mechanics lose. Backlash in a worn ball screw, thermal growth in a spindle, or a flexing fixture all appear as error the encoder never sees if the encoder is on the motor rather than the table. On a linear scale, the control sees the slide directly and can compensate more of it.

This is also where feed-forward helps. By injecting the planned acceleration into the command, the loop starts moving before the error builds, cutting following error substantially without raising gain. Higher gain is not free: push it too far and the axis hums, then faults.

  • 1
    Motor encoderSees the motor, not the slide. Blind to screw and nut wear.
  • 2
    Linear scaleSees the slide. Better for large parts and thermal drift.
  • 3
    Feed-forwardReduces following error without adding gain.
Boundaries

PLC logic, tool data and the limits of compensation

The PLC layer is not motion. It sequences the machine: tool changer arm, spindle orient, coolant, chip conveyor, door interlocks, pallet swap. Its cycle time is slow, 5 to 20 ms, because nothing it controls needs microsecond timing. When a tool change faults, this is the layer to inspect, not the servo.

Tool and work offset tables sit between the planner and the physical machine. They are data, not code, and they are the most common source of a good program producing a bad part. Radius and length wear offsets should be updated on a schedule, not only when a part fails inspection.

Compensation has hard limits. Thermal compensation works when the machine has temperature sensors and a model of its own drift. It does not fix a spindle that has been pushed past its duty cycle. Volumetric compensation maps geometric error across the work envelope, which matters at 4,000 mm travel and matters much less on a 500 mm machine.

The honest boundary: software can correct repeatable, measurable error. It cannot correct a fixture that moves under load, a tool that is chipping, or a setup that is not rigid. Those show up as scatter, not as a consistent offset, and no compensation table fixes scatter.

  • 1
    Repeatable errorThermal drift, screw pitch, squareness. Compensable.
  • 2
    Random errorChatter, loose fixturing, tool wear scatter. Not compensable.
Layer by layer

Cycle time and failure symptom by software layer

Cycle times are typical values, not a specification of any one control brand.

LayerTypical cycleFailure symptom
Interpreter1–20 msWrong coordinates, ignored modal code
Motion planner1 ms per blockCorner rounding, overshoot on short moves
Servo loop0.1–1 msFollowing error, surface chatter, axis hum
Spindle control0.5–2 msSpeed sag under load, poor finish
PLC logic5–20 msTool change faults, coolant timing errors
HMI and logging20–200 msSlow screen response, missing alarm history
Judging a machine

What to ask about the control before you buy

Questions that separate a control you can live with from one you cannot.

QuestionWhy it mattersWeak answer
Look-ahead block countSets surface quality on fine models"It is fast enough"
Encoder on motor or slideDecides what error is visible"Standard configuration"
Open PLC or lockedYou may need to add a probe or conveyor"Not user editable"
Data export formatFeeds your SPC and traceability records"Proprietary only"
Macro and probing supportIn-process measurement without extra hardware"Optional, extra cost"
Alarm history depthRoot-cause work needs more than the last alarm"Last 10 alarms"

Where the money actually goes

If your parts are simple and geometry is the only concern, a basic three-axis control with motor encoders is enough. If you run five-axis work, thin walls, or tight finishes at Ra 0.2–0.8 μm, pay for look-ahead, linear scales and feed-forward instead of a faster spindle. The control stack decides whether the machine can hold tolerance at speed. Send us the drawing and we will tell you which layer your part actually stresses.

FAQs

Questions engineers ask about control software

Is the CNC control software the same as CAM software?

No. CAM runs on a PC and produces the toolpath file. The control software runs on the machine and executes it.

They meet at the G-code. A problem in CAM shows as wrong geometry. A problem in the control shows as wrong motion, wrong finish, or a fault.

Why does the same program run differently on two machines?

Different look-ahead, different acceleration limits, different servo tuning, and different offset tables.

Two machines of the same model can still differ after years of wear. Treat the program as a starting point and verify the first part on each machine.

Can I add probing or a conveyor to a locked control?

Sometimes, through the PLC if the builder left it open, or through an external controller that talks over a fieldbus.

If the control is fully locked, plan for a retrofit or a different machine. Ask this before you order, not after.

Does higher position loop gain always mean better accuracy?

No. Past a point the axis becomes underdamped, hums, and faults under load.

Feed-forward usually buys more accuracy than raising gain, because it reduces following error without moving the stability margin.

How often should tool wear offsets be updated?

On a schedule tied to tool life and material, not only after a failed inspection.

For long runs we monitor in-process and adjust on a fixed interval. A wear offset that drifts slowly is easy to miss on a short sample.

Does thermal compensation remove the need to warm up the machine?

No. Compensation models error once the machine is in a known state. A cold start is not that state.

Warm-up runs and a stable shop temperature still do most of the work. Compensation handles the residual drift.

Send the drawing, get a manufacturability answer

We review your file against our control and machine capabilities and reply with a quotation and free DFM analysis within 12 hours. No minimum order quantity, from one prototype to 10,000+ part runs. Uploads stay confidential and an NDA is available on request.

12-hour quote100% inspectionNo MOQNDA on request

Follow

More from the shop floor

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC