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

Get Instant Quote

Feedback fundamentals

CNC encoder key function

An encoder turns shaft rotation into a pulse stream the controller can count. That count is how the machine knows where the axis really is, not where it was told to go. This page explains the mechanism, the numbers behind it, and the cases where the loop is not closed at all.

±0.005 mm machining tolerance127 CNC machinesISO 9001:2015
CNC encoder key function on a machine axis
Mechanism

What the encoder actually measures

A rotary or linear encoder is a sensor bolted to a moving element. It does not measure the tool tip, the workpiece, or the finished dimension. It measures rotation or travel and reports it as a stream of electrical pulses. The controller counts those pulses and converts the count into a position along the axis.

Most machine tools use one of two families. A rotary encoder mounts on the motor or the ball screw end. A linear encoder is a glass scale mounted on the machine casting, so it reads the table itself rather than the screw that drives it. Both feed the same control loop.

The distinction matters because every element between the motor and the table introduces error. Screw pitch error, thermal growth, and backlash all sit inside that chain. A motor-mounted encoder cannot see them. A scale on the casting can, which is why a machine with linear scales often holds tighter numbers on a long axis than the same machine running motor feedback only.

  • 1
    IncrementalOutputs pulses; position comes from counting, so a home reference is needed.
  • 2
    AbsoluteReports a unique code per position; no homing move after power-up.
  • 3
    RotaryReads motor or screw rotation, indirect measurement of table position.
  • 4
    LinearReads table travel directly; catches screw and thermal error.
Resolution

Resolution, accuracy, and why they are not the same thing

Resolution is the smallest step the encoder can report. Accuracy is how close the reported position is to the real one. A scale can resolve 0.1 μm and still be off by several microns over a meter if it is mounted badly or the machine is warm.

Resolution is usually quoted in pulses per revolution, or PPR, for rotary encoders, and in micrometers or nanometers for linear scales. The control multiplies the pulse count by an electronic factor, so the number on the datasheet is not automatically the number the axis can hold.

The practical limit is the whole chain: drive stiffness, screw preload, slide friction, and the servo loop gain. If the mechanics move 3 μm when the motor reverses, a 0.1 μm encoder reading will not fix it. It will simply report the 3 μm more honestly.

This is why a machine can be specified to ±0.005 mm and still be useful. That figure already includes the real behavior of the structure under load, not just the sensor resolution.

  • 1
    ResolutionSmallest reported step. A sensor property.
  • 2
    AccuracyCloseness to true position over the full travel.
  • 3
    RepeatabilitySpread when returning to the same point, again and again.
  • 4
    BacklashLost motion on reversal; the encoder sees it, the design causes it.
Feedback loop

Open loop versus closed loop on the shop floor

In a closed loop, the controller compares the commanded position with the encoder reading and corrects the difference continuously. In an open loop, it sends step and direction pulses and assumes the motor followed. Most machining centers are closed loop; many low-cost routers and some additive systems are not.

The difference shows up in the part. On a closed-loop machine, a dull tool that raises cutting force will slow the axis briefly, and the encoder will report that lag. The control then pushes harder to catch up. On an open loop, the same load simply means the axis falls behind, and nothing notices.

Stepper-driven machines can lose steps without any alarm. A missed step is invisible until the finished part is measured. If your drawing calls out ±0.005 mm on a stepper router running open loop, the tolerance is not backed by any feedback.

That is not a defect of the machine. It is a limit of the architecture. Match the tolerance callout to the control type you are actually buying.

  • 1
    Closed loopEncoder reports position; control corrects in real time.
  • 2
    Open loopNo position sensor; lost steps go undetected.
  • 3
    Semi-closedEncoder on screw, not on table. Common on VMCs.
  • 4
    Full closedEncoder on table travel. Catches screw and thermal error.
Applications

Where encoder feedback decides the process

Thread milling is a clean example. The control has to keep the spindle rotation and the helical tool path locked in phase. If the spindle encoder lags or drops pulses, the thread pitch drifts and the gauge will not pass. The same phase relationship governs rigid tapping.

Boring a deep, tight bore is another. The tool has to enter and exit on the same centerline. Any position error on the retract stroke shows up as a step or a bell mouth. Feedback resolves the retract path; the tool and the boring head decide the finish.

On five-axis work, the rotary table and the tilting head each need their own feedback. A small angular error at the pivot becomes a much larger linear error at the tool tip, roughly the sine of the angle times the distance from the pivot. Short tools and a tight pivot reduce that amplification.

For prototype and low-volume runs, this is the part of the process we watch when a feature is called out at ±0.005 mm or a finish at Ra 0.2–0.8 μm. The machine has to be able to see the error before it can hold the number.

  • 1
    Thread millingSpindle and path must stay in phase.
  • 2
    Rigid tappingSync error breaks the thread gauge.
  • 3
    Deep boringRetract error shows as a step in the bore.
  • 4
    5-axisAngular error grows with distance from the pivot.
Failure

How feedback problems show up in the part

A failing encoder rarely stops the machine cleanly. It produces a symptom that looks like a mechanical fault. Position drift over a long program, a sudden step in a contour, or an axis alarm at the same point in every cycle are the usual first signs.

Contamination is the most common cause in a wet cutting environment. Coolant mist and fine chips reach the read head or the disc and interrupt the light path. The result is dropped pulses and a growing position error, not a hard stop. Sealed read heads and a clean air purge help.

Cable and connector faults come next. A shield that is grounded at both ends, or a connector that wicks coolant, produces intermittent noise that only appears at certain feed rates. Swapping the encoder before checking the cable is a common and expensive mistake.

Temperature is the slow one. A scale that is accurate cold can drift as the casting warms through a long roughing cycle. If a feature only fails on the third part of a run, look at thermal growth before you look at the sensor.

  • 1
    Drift over a long programSuspect contamination or a warm structure.
  • 2
    Step in the contourDropped pulses or a loose coupling.
  • 3
    Repeat alarm at one pointOften a cable or connector, not the encoder.
  • 4
    Fails on later partsCheck thermal growth before replacing the head.
Selection

Encoder type compared by job requirement

Use the row that matches how tight your feature is and how long the axis is.

Encoder typeBest forWatch out forTypical use
Motor-mounted rotaryGeneral milling, short axesScrew and thermal error hiddenMost 3-axis VMCs
Screw-end rotaryMedium axes, semi-closed loopPitch error still present4-axis and mill-turn
Linear glass scaleTight tolerance on long axisNeeds clean mounting, alignmentJig borers, grinders
Absolute rotaryNo homing after power-upHigher cost per axis5-axis rotary tables
Magnetic ringHarsh coolant and chipsLower resolution than glassRoughing axes

What this means for your drawing

If your tightest feature is ±0.005 mm on a short axis, a well-maintained semi-closed machine will hold it. If the tolerance sits at the end of a 1 m axis, or you need the same number after an hour of roughing, pay for linear scales and a temperature-stable setup.

FAQs

Common questions about encoder feedback

Does every CNC machine have an encoder?

Most machining centers do. A closed-loop machine has at least one encoder per axis, usually on the motor or the screw end, plus one on the spindle.

Open-loop machines driven by steppers may have no position encoder at all. They count the pulses they send and assume the motor followed every one.

Can a worn encoder cause a bad surface finish?

Yes, but only indirectly. Dropped pulses make the axis lag and correct, which shows up as a witness mark or a periodic pattern on the surface.

Check the cut first. Tool runout, chip packing, and an unstable setup produce similar marks and are far more common.

Is a higher PPR always better?

No. Above a certain point the control cannot process the pulse rate at the feed rates you run, and the extra resolution sits inside mechanical error anyway.

Match PPR to the screw pitch and the tolerance you actually need. A very high count on a loose axis just reports the looseness more precisely.

Why does the machine need a homing move at startup?

An incremental encoder counts from wherever it starts, so the control has no idea where the axis is after power-up. It drives to a reference mark to establish zero.

An absolute encoder knows its position from a unique code pattern, so no homing move is needed. That saves time on a machine that cycles often.

What tolerance can we realistically hold on a prototype?

For most metals and features, ±0.005 mm is achievable on critical dimensions when the machine, tool, and setup are matched to the job.

Long axes, thin walls, and soft plastics are harder. Send the drawing and we will tell you which features can hold and which need a wider callout.

Do you inspect the parts that come off these machines?

Yes. Every batch gets a raw material check, in-process monitoring, and a final inspection before shipment. Reports are available on request.

Inspection closes a second loop. The encoder keeps the machine on path; the metrology keeps the finished part honest.

Send the drawing, get a real answer

Quotation and free DFM analysis within 12 hours. No minimum order quantity, from one prototype to 10,000+ parts, with NDA available on request.

12-hour quote100% inspection±0.005 mm tolerance

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