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
  • Change output based on position

Change output based on position

By using a thread it is possible dynamically to set an output if the position of TCP (Tool Center Point) exceeds a given value. The position of TCP can be defined either as Joint rotation or in Cartesian coordinates (XYZ)

Last modified on Jan 29, 2025

Examples are valid for:
CB3 Software version: 3.1.17779
e-Series Software version: All versions

Note that older or newer software versions may behave differently.

It is possible to toggle an output based on the robot position, independent of the main robot program. The robot position may be specified as a joint position (rotation of joint) or a Cartesian position specified by either x, y and/or z.

The output may be used to interrupt a moulding machine, CNC machine or other machinery, to prevent them from starting, when the robot is inside their working area.

Dynamic axis position check

In this example, the robot moves between two waypoints.
As long as the position of Base joint is less than 0 radians, output DO[0] is low.
If the position of Base joint exceeds 0 radians, the output will be set to high.

Dynamic 1
Note: Joint positions are defined in radians

Capture1

Dynamic Cartesian position check

In this example, the robot moves between two waypoints.
As long as the X-coordinate of the Cartesian Base coordinate system is less than 300 mm, output DO[0] is low. If the X-coordinate of Base coordinate system exceeds 300 mm, the output will be set to high.

Dynamic 3
Note: Cartesian coordinates are in meters

Capture2

If desired, the position check may be modified to test more than one coordinate or axis rotation.
In this example, DO[0] will only turn on when both the X-coordinate is larger than 300 mm and the Z-coordinate is larger than 200 mm. 

Capture3

Attached files


DynamicAxisPositionCheck.urp
DynamicCartesianPositionCheck.urp
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