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
  • Toggle the outputs in a program (Set command)

Toggle the outputs in a program (Set command)

THIS HOW TO DESCRIBES THE SET COMMAND.

Last modified on Jan 29, 2025

The Set-command can be used to change the state of the robots inputs or outputs. 
It can be used to set digital outputs to a given state, analog outputs to a given voltage or current or to change states of Modbus-registers and coils. 

  1. Go to the "Program"-tab (1) in the Program Robot section.
    Click the "Structure"-tab (2) to find a pallette of the available commands. 
    Find and click the "Set"-command (3) in the commands pallette.
    Figure1
  2. A Set-command is inserted into the program tree to the left. 
    Mark the "Set" command in the program tree, and click the "Command"-tab to see the details for this command. 
    Figure2

    The Set command gives 6 options: 
    A) Set a digital output to high or low. 
    This can be: 
    Digital Output 0-7 in control box
    Configurable Output 0-7 in control box
    Tool output 0-1 in tool connector
    Or a MODBUS output configured in the Modbus Client section in the Installation tab. See article 16357 for this.
    E.g. Set digital output 0 to High (24 V).

    B) Set an analog output to a value.
    If the analog output in the "I/O" tab is set to "Current" value is in mA. 
    If the analog output in the "I/O" tab is set to "Voltage" value is in Volts.
    E.g. Set analog output 0 to 7,5 Volts.

    C) Set an output to a function value. 
    This can be setting a MODBUS register to an integer value. The MODBUS register is configured in the Modbus Client section in the Installation tab, see article 16357. 
    A digital og analog output can also be chosen to be assigned a function value. 
    Digital outputs must be set to a boolean value (True/False) and analog outputs must be set to numeric.
    The expression can be used to calculate the value assigned, e.g. to set digital output 1 to "DI[1] and DI[2]", thus digital output 1 will only be set to high, if both digital input 1 and 2 are high. 

    D) Increment an installation variable by one. 
    The installation variables are defined in the Variables section in the Installation tab.

    Besides the actual output action, the Set command also offers two more optional options: 
    E) Change the payload of the robot. 
    This is very useful when using the output to operate a gripper, thus when an item is picked up or placed, the payload of the robot is changing. Using this may reduce Protective Stops in programs, since the payload will be correctly configured. 

    F) Change the current TCP settings. (only from software version 3.1)
    If using e.g. dual grippers, the TCP can be changed after one gripper is used or similer. 

  3. In this example, we will set digital output 0 to high.
    Figure3
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