Main Content

Set Up UR Series Cobot for RTDE

Setting up the Universal Robots cobot for exchanging data over RTDE involves configuring few parameters on the Teach Pendant and also transferring the URServer script to the Teach Pendant.

Configure Hardware Connection and Network Parameters

You need to perform network configuration for both the cobot and the MATLAB PC.

To configure network configuration for the cobot:

  1. Press the button to power on the Teach Pendant.

  2. Power on the UR Series cobot.

  3. In the graphical interface of the Teach Pendant, click the toggle menu at the top right corner.

    Toggle menu

  4. From the list of options, select Settings to enter the robot's setup.

  5. Select System and then select Network.

  6. In the Network tab, select Static Address and configure the parameters as shown here, and click Apply.

Configure Network Parameters of the Host Computer

After you complete these steps to configure the static IP address on the Teach Pendant, follow the instructions in Set Up Network Adapter and Basic Network Ping to set up the network adapter in the host computer running MATLAB, and test the network ping.

Load and Play UR Program on Hardware

  1. Open the MATLAB terminal and access the path where URServerScript.script file is available by using this command.

    installationFilePath = fullfile(codertarget.urseries.internal.getSpPkgRootDir,'resources')
    cd(installationFilePath)

    By default, the script is configured to disable the gripper actuation for Robotiq grippers. If you are using the hardware (URSeries cobot) with a gripper, you must enable the gripper. To enable the gripper, uncomment lines 160 (#rq_vacuum_grip(False,60,40,3000,True,"2")) and 169 (#rq_vacuum_release(False,5,True,"2")) in the URServerScript.script file before proceeding with the next step.

    Tip

    To utilize the gripper feature in the robot program, you must also download the URCap for gripper. For more information, see Vacuum Grippers - Robotiq and download the associated URCap file.

  2. Copy the URServerScript.script file from Current Folder browser in MATLAB to a USB and transfer it to the Teach Pendant.

  3. In the Teach Pendant interface:

    1. Create a new program.

    2. From the left navigation menu, select Advanced > Script.

    3. Click Robot Program > Script, and select File from the drop-down list.

      The Script Code pane now displays the Edit button that you can use to select the file.

    4. Click Edit > Open, and select the URServerScript.script file that you copied. Click Exit.

    5. Save the program.

Setting Up Connectivity Medium as RTDE and Validating Connection to URSeries Cobot

The final step in preparing the URSeries cobot involves setting RTDE as the connectivity medium and verifying a test connection between MATLAB and the cobot using the Hardware Setup process.

  1. Navigate to the Select connectivity medium window in the Hardware Setup wizard, select RTDE, and click Next.

  2. In the Select Interface window, select UR Series Manipulator, and click Next.

  3. In the Joint Angle Acquisition window, enter the UR Controller IP address in the Robot Address field, and click Get Joint Angles. MATLAB sends a command and verifies the communication with the UR Controller. If the communication is successful, the message - Joint angles acquired is displayed. In that case, click Next and follow the remaining steps to complete the Hardware Setup process.

    Tip

    The UR Controller IP address of the UR Series cobot on Linux is the same as the static IP address assigned to the cobot. For more information, see Step 6 in the Configure Hardware Connection and Network Parameters section.