AutomateDirectUSAMotion LibraryShop the parts catalog

How-to

Robot Conveyor Tracking: Wire the Encoder to the Controller

Sensors, encoders and machine vision on the machine Published 7 min read

Short answer

Yes, a PC application can feed part data to a tracked conveyor pick, but it must never own position. Terminate the quadrature encoder and the part-detect proximity switch on the robot controller's conveyor tracking input so the switch edge latches the count in hardware; the PC sends only class, offsets and grip choice. Live coordinates streamed through a PC arrive stale by the round trip, and at 300 mm/s every 10 ms costs 3 mm at the gripper.

On this page
  1. Why a PC cannot own part position
  2. The error budget
  3. Worked example: 3 mm at the gripper on a 300 mm/s belt with a 10 ms PC round trip
  4. Mount the encoder where the product is
  5. Terminate the switch on a hardware latch
  6. Commissioning order
  7. What the PC still owns
  8. Questions asked

Yes, with one architectural line drawn firmly. A PC application can feed the robot each part's identity, lateral offset and rotation, but it must never feed it live position coordinates: on a tracked conveyor, position belongs to the robot controller. Wire the quadrature encoder and the part-detect proximity switch directly to the controller's conveyor tracking interface, so the switch edge latches the encoder count in hardware and the controller compensates the motion every interpolation cycle. The reason is arithmetic, not preference: tracking error equals belt speed multiplied by the delay in the position path, so at 300 mm/s every 10 ms of PC round trip is 3 mm at the gripper.

Why a PC cannot own part position #

Every architecture that routes position through a PC fails in the same place: the value the robot acts on was sampled, serialised, queued and scheduled before it arrived, and it is stale by a different amount each time.

  • Streaming coordinates into robot variables. The arm chases a position one round trip old, plus jitter that varies cycle to cycle.
  • Echoing the switch bit. Wiring the proximity switch into the PC and mirroring it to a robot output converts a hardware position latch into an OS-scheduled event. The captured count becomes whatever the belt reached after the scheduler got around to it.
  • Pushing a position over the network. Conveyor compensation must be added inside the motion planner every interpolation cycle; an asynchronous coordinate arriving over Ethernet produces a staircase path that shows up as chatter at speed.
  • Cancelling with a lead offset. A fixed offset cancels the mean delay and nothing else. Jitter stays, and the offset is only correct at the belt speed where it was tuned.
  • Tuning the transport. Raising thread priority or changing the protocol shortens the mean and leaves the tail; a single garbage-collection pause can exceed the entire error budget.

The error budget #

The number that matters is e = v × Δt: belt speed times the total delay in the position path. Underneath it sit two fixed costs, encoder quantisation and sync-switch repeatability. Latency is the only term that grows with line speed.

Quantity What it does to the pick Where the number comes from
Belt speed v Multiplies every millisecond of delay Line specification, or the conveyor speed signal in the controller's I/O view
Position-path delay Δt e = v × Δt Measured on your network, never assumed
Encoder scaling Quantisation = 1000 ÷ counts per metre, in mm The counts-per-metre setting, fixed by the calibration move
Sync-switch repeatability Adds directly to part-to-part spread Switch datasheet, then twenty repeat runs on the real part
Start window width Must cover queue spread plus the approach move Conveyor tracking configuration
Queue tracking distance Parts beyond it leave the queue Conveyor tracking configuration
Minimum sync separation Parts closer than this merge into one queue entry Conveyor tracking configuration

Parameter names differ between controller versions; read the exact names from the configuration editor on the controller you are commissioning, not from memory.

Worked example: 3 mm at the gripper on a 300 mm/s belt with a 10 ms PC round trip #

The case: a belt running at 300 mm/s, one PC hop in the position path, and a measured round trip of 10 ms between the physical switch edge and the robot program reading the value.

Inputs:

  • Belt speed v = 300 mm/s, the line rate for this example.
  • Position-path delay Δt = 10 ms, one PC hop from switch edge to robot-side read, standing in for a measured round trip.

Rule in words: the latency error is the belt speed multiplied by the total delay in the position path.

Arithmetic:

e = v × Δt = 300 mm/s × 0.010 s = 3 mm

The tolerance burn rate is 300 mm/s ÷ 1000 = 0.3 mm per millisecond of latency. The same 10 ms hop costs 6 mm at 600 mm/s and 1.5 mm at 150 mm/s, and every extra 10 ms in the path adds its own 3 mm.

Result: one 10 ms hop costs 3 mm before the quantisation floor and switch repeatability are added, and it is the only error term that doubles when the line rate doubles.

Decision: divide your pick tolerance by 0.3 mm per millisecond; that quotient is the total delay budget for the whole position path at 300 mm/s. Any tolerance tighter than 3 mm has no room for even one 10 ms hop, so the encoder and the switch terminate on the controller, or on a PLC high-speed counter feeding the tracked frame with the edge latched in hardware, and the PC leaves the position path. Hold that architecture even when the tolerance is loose: latency error scales with line speed, so the cell that passed at commissioning fails at the first rate increase.

Mount the encoder where the product is #

Line tracking uses an encoder mounted directly to the conveyor's drive shaft or on an encoder wheel riding the travelling surface. Put it at the product, never on a motor shaft upstream of a gearbox, clutch or belt drive, where backlash and slip decouple the count from the part. Encoder placement relative to a reduction is examined in mounting a motor encoder behind a belt reduction; for conveyor tracking the answer is fixed: the encoder measures the surface that carries the product.

Use quadrature A/B rather than a single channel, so the count stays honest if the belt rocks backwards during a stop. Match the encoder's output type, voltage and data format to the tracking input before energising anything; Universal Robots' conveyor tracking guide, for instance, defines its encoder as an 8-bit unsigned value with range 0 to 255 or a 16-bit value, and your controller's document is the one that governs.

Terminate the switch on a hardware latch #

The working architecture ends both physical inputs on the tracking interface and nowhere else. The proximity switch goes to its sync input, and its rising edge latches the encoder count in hardware. From that latch the controller creates a queue entry and a frame that translates with the belt; motion programmed in that frame is compensated inside the interpolator at the controller's own clock rate, with no network in the loop.

Check the switch's output type the same way you would when wiring a PNP proximity switch to an optocoupler input: PNP or NPN, and the supply, must match what the sync input expects. Isolate the conveyor and the tracking interface before wiring either input.

If the controller has no encoder input at all, a PLC high-speed counter can own the counting, with the same discipline as counting encoder pulses on a PLC without losing position, provided the count and the latched edge reach the robot on a fixed, short cycle. Any software between the counter and that cycle needs clear task ownership for a real-time sensor stream, or samples and timestamps start arriving reordered.

The hardware takes different forms: ABB's conveyor tracking application manual locates the tracking module either inside the robot controller or in a cabinet close to it, and multi-robot line tracking installations feed one encoder to every controller through a pulse multiplexer. The rule survives all of them: nothing software-scheduled sits between the switch edge and the count.

Commissioning order #

  1. Confirm the conveyor tracking option is installed in the controller. Without it there is no tracked frame and no object queue, and no application code substitutes.
  2. Mount the encoder on a non-slipping wheel or a driven roller, and wire channels A and B to the tracking encoder input.
  3. Wire the proximity switch to the sync input. Route it through no PC and no PLC scan.
  4. Set counts per metre empirically: mark the belt, move it exactly 1000 mm measured with a steel rule, and compare the counter delta against the configured value. Correct the setting until the reading and the physical distance agree. The live encoder counts on the controller's setup screen should update as the conveyor runs.
  5. Calibrate the conveyor base frame so its X axis lies along the direction of travel, using a fixed feature carried on the belt at two or three positions across the working window.
  6. Enter the queue length, start window and minimum part separation from measured geometry: the switch-to-window distance and the smallest part pitch the line can produce.
  7. Run the pointer test with a bare robot program: command the tool to a fixed point in the tracked frame over a marked part and confirm it holds position as the belt runs. Do this before any PC code exists.
  8. Add the PC data channel last, with a sequence number on every record.

What the PC still owns #

Everything that is not position: part identity and class from vision, lateral offset, rotation, grip selection, and the accounting. Send each record with the sequence number of the queue entry it describes; the robot program consumes the queue entry, reads the matching record, and drops the part when the numbers disagree instead of picking on stale data. None of this is time-critical, because the tracked coordinate is already owned by the controller: a late record changes the grip pose, not where the robot believes the part is.

Questions asked

How do I measure the PC round trip before deciding?

Pulse a robot digital output the instant the PC application receives a message, trigger the scope on the part-detect switch edge, and measure the time between the physical edge and the output pulse. Stream continuously while you watch, because the number that matters is the worst case over minutes, not the mean. Garbage-collection pauses and background scans live in that tail, so let it run long enough to catch one.

Can a PLC own the encoder instead of the robot controller?

Only as a counter, never as the position owner. A PLC high-speed counter can count quadrature pulses without losing them, but the part-detect edge must still latch a count in hardware, and the count plus that latch must reach the robot controller on a fixed, short cycle the tracking function can consume. A switch on an ordinary scanned input adds the whole scan time as jitter, and a count pushed over an asynchronous link reintroduces the staircase the interpolator cannot absorb.

Why will a fixed lead offset not fix the delay?

A lead offset subtracts one constant from an error that is not constant. It cancels the mean delay and leaves the jitter, which is usually the larger share of the budget. It is also tuned at a single belt speed: the offset is the distance the belt travels in the mean delay, so at half that speed the offset itself becomes an error of comparable size. It buys a demo, not a cell.

Does camera latency hurt the pick?

Not the pick position, only the freshness of the attributes. The tracked coordinate belongs to the controller, so a vision record that arrives late changes the grip pose and the part identity, not where the robot believes the part is. The one rule is the sequence handshake: every record carries the sequence number of the queue entry it describes, and the robot drops or skips the part when the numbers disagree rather than picking on stale data.

Why did the scheme pass in simulation?

Because the simulation removes the term that dominates on the floor. A virtual controller and the PC application share one machine and one clock, so the transport latency of the real path, including sampling, queuing, scheduling and the network, is simply absent. A concept proven there proves the logic, not the timing. Re-prove it on hardware with a measured round trip before trusting any tolerance.

Keep reading

  • How-to

    Wiring PNP proximity switches to optocoupler inputs

    Give every PNP three-wire proximity switch its own optocoupler input, and combine after isolation when one axis has two endpoint switches. Size each series resistor as R = (Vsupply - Vdrop - VF) / IF from worst-case datasheet values: at 24 V with a 0.5 V sensor drop and a 1.2 V LED that gives 2.2 k ohm at 10 mA. Never copy a resistor from another board, and never series the sensor outputs.

    Sensors, encoders and machine vision on the machine

  • How-to

    Counting Encoder Pulses on a PLC Without Losing Position

    Count encoder pulses with a hardware high-speed counter input wired for quadrature, never with a count instruction in the scan. At 214 rpm and 75 pulses per revolution the encoder delivers 267.5 pulses per second, one every 3.7 ms, while a 10 ms scan cannot guarantee seeing even one in three. Zero the counter at a reference switch and treat every target as counts from that switch.

    Sensors, encoders and machine vision on the machine

  • How-to

    Measuring RPM With a Proximity Switch on a Pulley

    One bolt pass per revolution at 6,000 RPM is a 100 Hz signal any standard inductive proximity switch can produce and a scanned PLC input cannot reliably count, so route it to a high-speed input and verify the ON pulse clears the input's documented minimum — 100 µs on the DL05's X0–X2 inputs — with a scope at full speed.

    Sensors, encoders and machine vision on the machine