Learn Automation with MINATA #40: Encoders and Position Feedback — When Motion Has to Be Measurable
Encoders and Position Feedback: When Motion Has to Be Measurable
An encoder turns rotary or linear movement into a signal, so the PLC or the drive knows how far the mechanism has travelled, how fast it is going and where it is now. It is feedback, not magic. If the mechanism slips, if a coupling has backlash, or if you are measuring in the wrong place, the encoder data can look perfectly healthy while the working end of the machine is in the wrong position.
What an encoder is used for
- Measuring the speed of a conveyor or a rotating shaft.
- Counting length from a measuring wheel.
- Position feedback for a servo, and for the homing routine.
- Synchronising packaging, print marks or step-wise cutting.
An incremental encoder produces A and B pulses, and often a Z pulse, from which count and direction are derived. An absolute encoder reports an absolute position code over an appropriate protocol. Which one you choose depends on whether the position must survive a power cut, and on speed, cable length, environment and what the input or drive can actually read.
From pulses to engineering units
Do not show an operator "123456 pulses". Convert the count into millimetres, revolutions per minute or degrees, using the encoder resolution and the transmission ratio. An encoder driven through a measuring wheel needs the effective circumference, the slip and the way the material contacts the wheel to be accounted for. A formula that is correct on the drawing can still be wrong on the machine if the roller slips.
Homing and the reference point
An incremental encoder does not know where zero is after power-up. The machine needs a homing routine: move at a safe speed, find the home sensor or the Z mark, stop and assign the coordinate. Soft limits in software only mean something once the position has been referenced; hard limits and the safety measures the risk assessment calls for are still required.
Incremental and absolute
| Type | Holds position through a power cut | Needs homing | Notes |
|---|
| Incremental (A/B/Z) | No | Yes | Cheap and common; a relative pulse count |
| Absolute single-turn | Within one revolution | Little or none | Knows its absolute position inside one turn |
| Absolute multi-turn | Yes, across many turns | No | Keeps absolute coordinates even after power loss |
Resolution and quadrature, with numbers
An incremental encoder counts on the edges of A and B. With ×4 quadrature decoding, an encoder of 1000 pulses per revolution gives 4000 counts per revolution. Drive it through a measuring wheel of 200mm circumference and the resolution at the material is 200mm / 4000 = 0.05mm per count. For something finer, raise the pulse count or reduce the wheel circumference — but check the maximum pulse frequency the input or drive can read at your highest speed before you do.
Encoder outputs and cabling
A line driver output (differential, RS-422) tolerates noise and long distances far better than open collector or push-pull. Long cable plus a high pulse frequency is how counts go missing. Compare the maximum pulse frequency — pulses per revolution multiplied by revolutions per second — against the input limit, use screened cable, and bond PE correctly so the count stays honest.
A worked engineering situation
A slide runs on a servo with an encoder. On power-up, the system demands homing before Auto is allowed. The PLC watches Home done, In position and drive faults; the HMI permits jogging within limits. If the count does not change while the motor is turning, the fault-finding starts at the coupling, the encoder cable and the drive feedback — not by editing the logic.
Encoder checklist
- [ ] It is written down whether the goal is speed, length or absolute position.
- [ ] The resolution has been converted and verified at the working end.
- [ ] Cable, screen and the input or drive standard are compatible.
- [ ] Homing, limits and the reaction to lost feedback all exist.
- [ ] Repeatability was measured after commissioning, not just once.
An encoder turns motion into data. #41 moves on to the HMI, where that data has to be presented so an operator can make the right decision.
Read more automation knowledge at MINATA: https://minatavn.com/en/blog/industrial-automation
Previous — #39: Servo against VFD: https://minatavn.com/en/blog/automation-39-servo-vs-vfd
Next — #41: Basic HMI for a machine: https://minatavn.com/en/blog/automation-41-basic-hmi
View all MINATA technical articles