Articles Download Safety & Security Forum myUR Go to Main Site

Universal Robots A/S
Energivej 51
DK-5260 Odense S

T: +45 8993 8989
sales@universal-robots.com

 
  • Articles
  • Download
  • Safety & Security
  • Forum
  • myUR
  • Go to Main Site
  • Support
  • Articles
  • LEGACY Conveyor tracking guide (CB3 ≤ 3.8 and e-Series ≤ 5.2)

LEGACY Conveyor tracking guide (CB3 ≤ 3.8 and e-Series ≤ 5.2)

The conveyor tracking functionality adjusts robots paths to the motion of a conveyor.

Last modified on Jan 29, 2025

The conveyor tracking functionality adjusts robots paths to the motion of a conveyor.
Conveyor tracking for linear and circular conveyors is available from software version 1.8.

This example is based on setup on a CB2 controller but can also be used on CB3 and e-Series.

For PolyScope versions newer than 3.8 and 5.2 see: https://www.universal-robots.com/articles/ur/programming/new-conveyor-tracking-guide-cb3-38-and-e-series-52/

Lower down on this page is an example of a linear and circular setup.

Note:
The CB3 and e-Series controller can decode signals at up to 40kHz
The CB2 controller can only decode signals at <50Hz, (<25Hz for quadrature signals)

Script codes for conveyor tracking

Script code Description
conveyor_pulse_decode(type, A, B) Sets controller to treat digital inputs A and B as pulses from encoder
get_conveyor_tick_count() Feedbacks the counting of the encoder function
set_conveyor_tick_count(tick_count) Sets the count value of encoder (absolute encoder)
stop_conveyor_tracking() Lets robot follow the original trajectory instead of following the encoder value
track_conveyor_circular(center, ticks_per_revolution, rotate_tool) Makes robot movement follow a circular trajectory
track_conveyor_linear(direction, ticks_per_meter) Makes robot movement follow a linear trajectory

 

Encoder setup

Conveyor tracking can use both absolute and incremental encoders

  • Incremental Encoders

Use script function conveyor_pulse_decode(type, A, B) to make the robot controller decode pulses on digital input number "A" and "B". The supported types are:
0 : no encoder, pulse decoding is disabled.
1 : quadrature encoder, input A and B must be square waves with 90 degree offset. Direction of the conveyor can be determined.
2 : rising and falling edge on single input (A).
3 : rising edge on single input (A).
4 : falling edge on single input (A).

The CB3 controller can decode signals at up to 40kHz

The CB2 controller can only decode signals at <50Hz, (<25Hz for quadrature signals), so you must choose your encoder resolution and encoder disc size carefully. The controller interpolates the encoder ticks, so the precision is high as long as the conveyor speed is relatively constant.

For a linear conveyor, you can calculate the number of ticks per second with the following formula:

ticks_per_second = conveyor_speed[m/s] * encoder_resolution[ticks/revolution] / (2*pi*encoder_disc_radius[m/revolution])

  • Absolute Encoders

You can input absolute encoder readings into the controller with the function set_conveyor_tick_count(value) Do it in a thread in your program. If MODBUS signal MODBUS_1 contains readings from an encoder:

Set Conveyor Program

  • Check encoder counting

You can check the counting of the encoder with the script function get_conveyor_tick_count()



Track linear conveyor SIMULATED

Use the script function track_conveyor_linear(direction, ticks_per_meter) to enable tracking on linear conveyors. Use stop_conveyor_tracking() to return to normal operation. The direction is a pose value, note that only the three positional parameters are used.

The following program makes move along the x-axis of the robot base coordinate system due to the ticks of a simulated encoder in Thread_1:

Simulated _conveyor

Download sample program at the buttom of the page. File name is SIMULATED_track_linear_conveyor.urp



 

Track circular conveyor SIMULATED

Use the script function track_conveyor_circular(center, ticks_per_revolution, rotate_tool) to enable tracking on circular conveyors.

Use stop_conveyor_tracking() to return to normal operation.

The center is a pose value, determining the center which the conveyor rotates about.

You can use a feature as the center variable.

rotate_tool determines if the tool should rotate with the conveyor or stay in its original orientation.

SIMULATED_track _circular _conveyor
Download sample program at the bottom of the page. File name is SIMULATED_track_circular_conveyor.zip

Important: It is required to download and load the installation file, included in the .zip file, as it contains a feature that defines the center of the conveyor

Attached files


SIMULATED_track_circular_conveyor.zip
SIMULATED_track_linear_conveyor.urp

Attached files

SIMULATED_track_circular_conveyor.zip
SIMULATED_track_linear_conveyor.urp

Related articles

Conveyor tracking: using encoder that outputs a Modbus register
Conveyor tracking: using encoder with digital pulses
Conveyor tracking: FIFO queue
NEW Conveyor tracking guide (CB3 ≥ 3.8 and e-Series ≥ 5.2)
logo

Product

  • UR3e Robot
  • UR5e Robot
  • UR10e Robot
  • UR16e Robot
  • UR20 Robot
  • UR+ Products

Company

  • About us
  • Contact us
  • Careers We're hiring
  • UR merchandise

Training / Resources

  • Academy
  • Technical Resources
  • Articles
  • FAQ

Insights

  • Blog
  • Case stories
  • Content library
  • News centre
  • Podcast
  • Webinars & Events

Get in touch

  • Ask an Expert
  • Schedule a no-cost assessment
  • Find a distributor
  • Customer support

Connect with us

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube
  • Instagram
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com
  • Copyright @ Universal Robots 2025
  • Cookie policy
  • Privacy policy
  • Universal Robots A/S
  • Energivej 51
  • DK-5260 Odense S
  • T: +45 89 93 89 89
  • sales@universal-robots.com
  • US Corporate Office
  • 27-43 Wormwood St.
  • 02210 Boston, MA.
  • +1-844-GO-COBOT
  • ur.na@universal-robots.com

Copyright © Universal Robots 2025

Cookie policy
Privacy policy