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
  • Switch case

Switch case

A “Switch Case” construction can make the robot change behavior based on sensor inputs or variable values.

Last modified on Jan 29, 2025

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

Note that older or newer software versions may behave differently.

 

From version 3.2 the command ”Switch” has been added to the PolyScope software. The “switch” is located under Structure  tap, then Advanced tap.

0

A “Switch Case” construction can make the robot change behavior based on sensor inputs or variable values. Use the expression editor to describe the base condition and define the cases under which the robot should proceed to the sub-commands of this Switch. If the condition is evaluated to match one of the cases, the lines inside the Case are executed. If a Default Case has been specified, then the lines will be executed only if no other matching cases were found.

Each Switch can have several Case’s and one Default Case. Switches can only have one instance of any Case values defined. Cases can be added using the buttons on the screen. A Case command can be removed from the screen for that switch.

Below is a simple program showing how a Switch case can be used. One could also use a Modbus register for selecting a case where a particular program would be located.

1

Attached files


switch_operator_input.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