AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Explainer

Tracking Products on a Conveyor With an Absolute Encoder

Sensors, encoders and machine vision on the machine Published 6 min read By AutomateDirectUSA engineering team

Short answer

An absolute encoder gives you the conveyor's true position, but tracking only works when the controller binds each product's inspection result to a conveyor coordinate at detection and carries it to the release point. Work out counts per meter from the encoder and roller, size the tracking buffer for the product count, and the robot gets the right part every cycle.

On this page
  1. What the encoder gives you and what it does not
  2. From encoder counts to belt position
  3. Binding a result to a position
  4. Worked example: transit time and buffer pacing
  5. Sizing the rest of the chain
  6. The decision
  7. Questions asked

An absolute encoder tells you where the conveyor is, not where each product is. Tracking starts the moment a detection sensor fires at the inspection station: the controller writes a new entry into a tracking buffer, stamps it with the current encoder position, and from then on moves that entry with the belt by counting encoder steps. At the release station the robot asks for the oldest entry, reads its OK or NOK result, and sorts. Set the buffer depth to the maximum product count between detection and release, and set the position scale from the encoder resolution and roller diameter — everything else in the application hangs on those two numbers.

What the encoder gives you and what it does not #

Encoder feedback on a conveyor serves two jobs: it reports belt speed and direction, and it reports how far any object on the belt has traveled since it was detected. An absolute encoder adds one property an incremental encoder lacks: after a power cycle it still reports true position, so the tracking buffer's coordinate reference survives a control-system restart without a re-homing move.

What no encoder gives you is product identity. The encoder sees the belt, not the plates riding on it. A photoelectric sensor — a contactless optical device that detects an object in its beam — creates the product event. That detection is the moment a plate's record is born in the tracking buffer; the encoder counts then carry that record to the end of the line. If parts can sit on the belt while the controller is off, an absolute encoder is the difference between sorting correctly on restart and rejecting the first sections of product after every power-up.

From encoder counts to belt position #

Every tracking decision depends on one scale factor: counts of belt travel per meter. You get it from the pulses the encoder produces per revolution and the effective diameter of the roller or drive drum it rides on:

belt travel per encoder revolution = π × roller diameter

counts per meter = pulses per revolution ÷ (π × roller diameter in meters)

Worked example, using illustrative values in the style of a typical retrofit: a quadrature encoder rated at 600 pulses per revolution on a roller of 63.69 mm diameter. The roller circumference is π × 0.06369 m ≈ 0.2001 m, so the belt advances about 0.2001 m per revolution. Counts per meter are 600 ÷ 0.2001 m ≈ 2,999 counts per meter, or about 3 mm of belt per count. This is a calculated example for those two inputs — take the real pulse count and the real roller diameter from your encoder and machine datasheets, because a different roller shifts the scale proportionally: double the roller diameter and you halve counts per meter.

The useful check is position error at the release point. With about 3 mm of belt per count, a part released with a ±1 count uncertainty lands within a few millimeters of its tracked position — comfortable for a 135 mm plate and a sorting gripper, marginal for small parts or a tight pick window. If the release tolerance is smaller than a few counts, gear the encoder down or pick a higher-resolution device.

Binding a result to a position #

The tracking record is the whole application. At the detection sensor the controller creates an entry — position stamp, station 1 thickness result, station 2 label result, and a status field left open until each station fills it. Between events, on every encoder update, the controller adds the counted delta to every open entry's position. At station 3 the entry whose tracked position matches the robot's pick coordinate carries the OK or NOK verdict.

Two implementation details decide whether this holds up:

  • Buffer depth. With up to 20 plates between station 1 and station 3, the buffer must hold at least 20 open records. Add slack for a stopped belt with a part just past the detector; a depth of 24 or 32 slots costs almost nothing in memory and removes an overflow failure mode.
  • Overflow discipline. Define what happens if a record reaches the end of the tracked zone without a release event: reject the part to a safe bin or raise a fault, never silently drop the record, because a dropped record means an uninspected plate gets sorted by whatever decision happens to be oldest.

The FIFO structure for this, and the gotchas of carrying part data between detection and pick, are covered step by step in the guide on tracking conveyor parts with an encoder and a FIFO buffer.

Worked example: transit time and buffer pacing #

Take the example layout: stations 1, 2 and 3 at 1.5 m spacing, so a plate travels two intervals, 3 m, from first inspection to the sorter. At the stated maximum belt speed of 500 mm/s, transit time is 3,000 mm ÷ 500 mm/s = 6 s.

That 6 s sets the real-time budget. Every station has at most 6 s at full speed to measure, decide and write its result into the plate's record — the vision system at station 2 must return a verdict inside that window or the plate arrives at the sorter unlabeled. At half speed the same plate takes 12 s, so the logic must handle variable transit time rather than a fixed timer. The encoder-based position update handles this naturally: position tracks the belt regardless of speed, while any fixed-delay approach breaks the moment the belt slows down.

Within the same example, with roughly 2,999 counts per meter from the calculation above, the 3 m journey spans about 8,997 encoder counts, and a 135 mm plate occupies about 405 counts. Spacing your detection logic so consecutive plates are never closer than a few hundred counts prevents one plate's record from being overwritten by its neighbor's.

Sizing the rest of the chain #

The encoder is one input among several the retrofit has to get right. The detection sensor must see the smallest part reliably at full belt speed; the controller's counting input must accept the pulse frequency — at 500 mm/s with about 3 counts per mm, that is roughly 1,500 pulses per second, well within a standard digital input but worth confirming against the controller's documented input frequency; and the release mechanism needs the tracked position, not just the result flag. Robot-side conveyor tracking, where the controller continuously shifts the robot's target with the encoder, is a different layer on top of the same counting chain — the article on what a conveyor tracking retrofit needs beyond an encoder walks through the full hardware list.

The decision #

For a line of this shape — absolute encoder on the roller, one photoelectric detector at first inspection, a FIFO buffer of at least 20 slots (24 for slack), and a controller that updates every record's position on each encoder count — product tracking works with commodity hardware and no specialized tracking module. Commit to these numbers: scale the encoder with your own roller diameter, budget each station's decision inside the transit time, and define the overflow behavior before the first plate runs. If the parts get smaller than a few tens of millimeters or the release tolerance tightens below roughly 5 mm, move to a higher-resolution encoder rather than trusting more counts from the same one.

Questions asked

How long does a product take to travel from station 1 to station 3 at 1.5 m spacing?

Two 1.5 m station intervals make 3 m of travel. At a maximum belt speed of 500 mm/s, travel time is 3,000 mm divided by 500 mm/s, which is 6 s. At half speed the same distance takes 12 s, so the tracking buffer must hold data for the full range of possible transit times, not just the fastest case.

How many encoder counts are there per meter of belt travel?

It depends on pulses per revolution and roller diameter. A 600 pulses-per-revolution encoder on a roller of 63.69 mm diameter sees a roller circumference of about 0.2001 m, so the belt moves about 0.2001 m per revolution and that works out to roughly 2,999 counts per meter of belt travel, or about 3 mm of belt per count. Take the real values from your own encoder and roller datasheets.

Can the encoder alone tell which product is which?

No. The encoder only reports how far the belt has moved. A detection sensor at the inspection station creates the product entry in the tracking buffer, and the encoder counts move that entry down the conveyor. Without a detection event the controller cannot know a new plate entered the line.

How many results must the tracking buffer hold?

Size it for the maximum number of products that can physically sit between the detection point and the release point. With up to 20 plates between station 1 and station 3, a 20-slot first-in first-out buffer is the minimum; using a few extra slots covers the case where the belt stops with a part just past the detector.

Keep reading

  • How-to

    How to Track Conveyor Parts With an Encoder and a FIFO Buffer

    Load one FIFO element per slot of encoder-measured belt travel and read any element by index arithmetic instead of shifting data down a table. Worst-case registration error equals one slot length, and update cost is constant whether the block holds 100 or 100,000 elements. Size the slot from placement tolerance and the block from sensor-to-actuator distance plus 10 to 20 percent margin.

    Sensors, encoders and machine vision on the machine

  • How-to

    Simulate Robot Conveyor Tracking Without an Encoder

    Yes: configure linear conveyor tracking to take its tick count from script, then advance a counter in a parallel thread and push it to the tracking setup with set_conveyor_tick_count(). The tracked offset moves at the tick update rate divided by the configured ticks per meter, so you choose the simulated belt speed and verify it before any conveyor hardware exists.

    Sensors, encoders and machine vision on the machine

  • Troubleshooting

    Why Robot Conveyor Tracking Ignores Encoder Speed Changes

    A conveyor-tracking motion that ignores encoder speed has one of three faults: the controller receives no changing count, the count converts to the wrong belt distance, or the executed motion never activates the conveyor reference. Confirm the count changes with belt speed first, calibrate distance per count second, verify tracking activation third — in that order. Speed and acceleration settings cannot supply a missing reference.

    Sensors, encoders and machine vision on the machine