The Universal Robots MQTTspB integration refers to the detailed instructions on installing and utilizing the MQTTspB Client URCap with Universal Robots. It covers the essentials of URCap, MQTTspB, and RTDE clients, aiming to equip users with a comprehensive understanding of MQTT protocol operations. A basic knowledge of MQTT is recommended to benefit fully from this guide.
On this page:
This page provides guidance on how to install and use the MQTTspB Client URCap with Universal Robots. Included is information about URCap, MQTTspB and RTDE clients. A fundamental understanding of the MQTT protocol operation is important to gain the most from this guide. If you are not familiar with MQTT, we suggest reviewing the appropriate resources to gain a fundamental understanding before proceeding with the installation and configuration of the MQTTspB Client URCap. Furthermore, we want to emphasize that the same interface and settings apply to all scenarios in which the URCap is used. Consequently, all the instructions and screenshots provided in this guide are applicable across different situations. It is important for Windows users to note that a Virtual Machine might be necessary for certain applications. Further details regarding installation and configurations will be provided in the later sections of this document.
This guide will walk you through the process of installing and configuring MQTTspB URCaps on Universal Robots products: UR20, UR10e, UR3e, UR5e, UR16e, which have the Polyscope software embedded on them. The minimum Polyscope version required for our solution is 5.11.0.
Step 1: URCap Installation
1.1. Ensure that your Universal Robots product is running at least Polyscope version 5.11.0.
1.2. Download the *.urcap file on your computer.
1.3. Use WinSCP (or a similar SFTP/SCP software) to connect to your robot. You will need the IP address of the robot for this. The default user is "ur" and the password is "easybot"
1.4. Once connected, navigate to the Programs folder (/Programs/) on the robot's system and create a new folder named "MQTTspB URCaps".
1.5. Copy the downloaded *.urcap file (or just drag and drop) into the newly created PolyScope Programs Folder (/Programs/MQTTspB URCaps).
1.6. On your Universal Robots product, navigate to Program Settings → System → UR Caps. Click on the plus (+) button and browse for your *.urcap file.
1.7. To complete the installation, restart Polyscope.
Step 2: URCap Configuration - Connecting to the MQTT Broker and Setting up Configuration
2.1. To begin configuration, navigate to Installation Tab → UR Caps → MQTTspB Publisher.
2.2. Open the configuration window and select the MQTT Broker Info tab. Fill in the necessary information for the MQTTspB Client.
2.3. Switch to the Communication Manager tab. Enter the following information:
2.3.1. The name of the robot.
2.3.2. The MQTTspB Topic/Address
2.3.3. The Robot IP Address (required for RTDE connection).
Step 3: Running the MQTTspB URCaps
3.1. In the Communication Manager tab also contains Start/Stop buttons for both MQTTspB and RTDE Client connections.
Step 4: Obtaining the License
4.1. Navigate to the 'License' tab.
4.2. Click on the 'Get SiteCode' button. This action will generate a .txt file in the /root/GUI folder.
4.3. Transfer the generated file to our support team at support@tatsoft.com. If you're transferring the file to a Windows system, you can use WinSCP or a similar SFTP program.
4.4. Transfer the Site code that our support team sends back to you, to the Universal Robots product.
4.5. In Polyscope, navigate to 'MQTT Publisher' -> 'License Tab' -> 'Load License Key'. Then select the file and click 'Open'.
To make use of this feature, the following system requirements must be met:
Security is a crucial part of any automation system. MQTTspB Client URCap supports using TLS/SSL secure connections to protect your MQTT communications. To utilize this feature, you should acquire certificates in the PEM format from the MQTT broker administrator.
Please note that to establish a secure connection, you would need several certificate files, including a Server Certificate, a Client Certificate, a Client Certificate Key, and the Private Key Password. Make sure to supply the paths to these .pem files to the publisher when setting up.
The URCap application consists of three separate processes running in parallel.
MQTT and RTDE definitions are available in the end of this section. This program behavior is illustrated as per image below.
The RTDE protocol generates messages every 8ms (125Hz). However, the MQTT client does not publish at the same rate. It only publishes new data if any variable has changed its value since the last reading.
MQTT: A lightweight, publish-subscribe network protocol that transports messages between devices. SparkPlugB includes additional control and standards, allowing for information about birth, death, and better data exchange control. For more information on the SparkplugB specification, please refer to the official documentation. The MQTT client can connect to an MQTT broker located on any accessible network, not being restricted to the same local network as the robot. This means that communication can be established with a broker in the cloud, for example.
RTDE: An interface that provides a way to synchronize external applications with the UR controller over a standard TCP/IP connection, without breaking any real-time properties of the UR Controller. For more information, please refer to the official documentation.
Preparing the URCap File:
Using WinSCP for File Transfer:
Finding the IP of the Robot :
An MQTT broker is a lightweight, efficient messaging middleware used in the Internet of Things (IoT) and other connected applications. It acts as an intermediary between devices and applications, facilitating the exchange of data in a publish-subscribe model. Clients, such as sensors or smart devices, publish messages to specific topics on the broker, which then disseminates these messages to interested subscribers. The broker ensures reliable message delivery, minimal bandwidth usage, and low latency, making it ideal for resource-constrained environments. Its simplicity, scalability, and support for real-time communication make it a popular choice for securely managing and orchestrating communication in decentralized networks.
For the purpose of this guide, it is assumed that you already have an MQTT broker up and running. If you do not have one in place, please consult the relevant documentation or your system administrator for assistance in setting one up.
This new tool will be available after importing the *.urcap file and restarting the URSim.
There are three tabs: MQTT Broker Info, Communication Manager and License.
Configuration Tab
Communication Manager Tab
This tab also contains Start/Stop buttons for both MQTTspB and RTDE Client connections. |
When you first install this URCap, the default license is called Express. It allows you to run your application for two hours straight. After this time, all clients are stopped automatically. You can run the application without limitations once it is licensed.
Licensing your application entails obtaining a softkey license generated specifically for your equipment's SiteCode.
Navigate to Installation →MQTTspB Publisher →License and click on "Get Site Code".
Forward the generated file to support@tatsoft.com, and in response, you will receive a license key.
Within the License tab, click the "Load License Key" button to introduce the provided key.
Using a USB on Polyscope for Licensing:
If opting for a USB-based license key loading:
More licensing methods will be added in the future. |
The Product Model refers to the amount of communication points allowed. As the Data Structure has a fixed max size, all URCap licenses are ”unlimited”.
The protocol available for this application is RTDE.
You can verify the status of modules on the Communication Manager tab, close of the Start/Stop buttons.
There is also available the module status on toolbar where exist the UR+ option. This is an easy way to verify the current status.
In addition to manually entering configuration parameters in the PolyScope Installation Tab, you can also import the parameters through a *.xml file.
The syntax for this file is as follows:
<?xml version="1.0"?> <Configuration> <Robot> <Name>My_Robot_Name</Name> </Robot> <MQTT_Client> <BrokerURL>127.0.0.1</BrokerURL> <Port>1883</Port> <ClientId></ClientId> <UserName></UserName> <Password></Password> <x509Certificate></x509Certificate> <CertificatePassword></CertificatePassword> <NetworkSecurity>None</NetworkSecurity> <!-- None / SSL --> <QoS>AtLeastOnce</QoS> <!-- AtMostOnce / AtLeastOnce / ExactlyOnce --> <KeepAlive>10</KeepAlive> <PublishRate>500</PublishRate> <Topic>GroupId/NodeId/DeviceId_01</Topic> <AutoRun>false</AutoRun> <Variables> <!-- <Joint_Control_Currents RBE_DeadBand="Absolute;0.1" Enable_Publish="true"></Joint_Control_Currents> <Actual_Tcp_Position RBE_OutOfRange="-2;2" Enable_Publish="true"></Actual_Tcp_Position> <Target_Joint_Accelerations RBE="" Enable_Publish="false"></Target_Joint_Accelerations> <Controller_Info RBE_DeadBand="Percentual;5" Enable_Publish="true"></Controller_Info> --> </Variables> </MQTT_Client> <RTDE_Client> <IpAddress>127.0.0.1</IpAddress> <Port>30004</Port> <Frequency>125</Frequency> <AutoRun>false</AutoRun> </RTDE_Client> </Configuration> |
Configuration Parameters Guide
<Robot>
<Name>:
Description: The unique name assigned to the robot.
Format: String.
<MQTT_Client>
<BrokerURL>:
Description: The URL of the MQTT broker to which the client should connect.
Format: String with URL format (e.g.: mqtt://broker.example.com).
<Port>:
Description: The port number for the MQTT connection.
Format: Integer (e.g. 1883).
<ClientId>:
Description: Unique identifier for the client in the MQTT broker.
Format: String.
<UserName> and <Password>:
Description: Credentials for authentication to the MQTT broker, if required.
Format: String.
<x509Certificate>:
Description: Path to the x509 certificate, used when SSL is enabled.
Format: Path to the file.
<CertificatePassword>:
Description: Password of the x509 certificate.
Format: String.
<NetworkSecurity>:
Description: Specifies the network security type for the MQTT connection.
Options: None, SSL.
<QoS>:
Description: Quality of service for MQTT messages.
Options: AtMostOnce, AtLeastOnce, ExactlyOnce.
<KeepAlive>:
Description: Time interval (in seconds) that the client must wait between sending control packets.
Format: Integer.
<PublishRate>:
Description: rate at which MQTT messages are published.
Format: Integer, in milliseconds.
<Topic>:
Description: The MQTT topic in which the messages are published.
Format: String with the topic structure (e.g. GroupId/NodeId/DeviceId_01).
<AutoRun>:
Description: If true, starts MQTT communication automatically upon initialization.
Options: true, false.
<Variables>:
Description: List of variables with additional settings.
Format: Commented in XML, by default. Can be uncommented and configured as needed.
<RTDE_Client>
<IpAddress>:
Description: The IP address of the RTDE client.
Format: String with IP address format (e.g. 192.168.1.1).
<Port>:
Description: The port number for the RTDE connection.
Format: Integer (e.g. 30004).
<Frequency>:
Description: Communication frequency in Hz.
Format: Integer.
<AutoRun>:
Description: If true, starts RTDE communication automatically on initialization.
Options: true, false.
For the application to accurately read the file, certain criteria MUST be fulfilled:
A sample configuration file can be downloaded here.
If no file is found when loading up the PolyScope, the configuration fields will be completed with default settings. The file is updated with the configured parameters every time a Client is started or stopped. Also, a new file is created if it does not exist. |
Variables entry allows you to Enable/Disable DataModel branches and customize a branch’s Change Event Definition. This definition determines when an event occurs to be published to the MQTT Broker. By default — or when entry is empty/blank —, all value changes will be reported.
The syntax to be utilized is detailed as:
<Joint_Control_Currents RBE_DeadBand="Absolute;0.1" Enable_Publish="true"> </Joint_Control_Currents> |
There are two possible RBE DeadBand options:
It is important to know variable customizations will be applied to the specified Branch and all its children, unless they have their own customization.
This entry can be customized ONLY through the .xml file.
The DataModel published to the MQTT Broker is pre-defined based on various UDTs (User-Defined Types). Click here to download an example *.html file.
When the MQTTspB Client is started, if connected to the Broker, you should be able to see the Robot data model using a different Client. The images below illustrate the model with FRAMEWORXclient.
This section will detail how the DataStructure is modeled.
Robot Name
Can be customized with the XML file only.
Arm Info
Controler Info
Metadata
UNS
String variables that do not exist in RTDE context:
Control
Status:
IO:
Safety:
Control:
OEE:
String variables that do not exist in RTDE context.
Productivity:
String variables that do not exist in RTDE context.
System Monitor:
This section provides guidance on how to solve some common issues you may encounter while using the MQTTspB Client URCap.
WinSCP Errors:
WinSCP is commonly utilized to transfer files and access the robot. Here are some frequent issues and their fixes:
Connection Timeout or Refused: Ensure you're using the correct IP address and port for the robot. Check if the robot is powered on and reachable on the network. Sometimes, restarting both the robot and the computer can help.
Authentication Failed: This error can arise if you enter the wrong username or password. Verify your credentials and try again.
Unable to Transfer Files: If you're having problems transferring files, check the available storage on the robot. Additionally, verify the file's format and size are supported by the robot's system.
Permission Denied: You might not have the required permissions to access specific directories or files on the robot. Ensure you're logged in with the right user privileges.
Host Has Not Answered for More Than 15 Seconds: This could be due to a temporary network glitch or the robot being busy. Click "Retry" a couple of times. If it continues, check your network connection.
Connection Errors:
If you're having difficulty connecting to the MQTT Broker, ensure you've entered the Broker's details accurately in the MQTT Broker Info tab. Validate the Server and Client Certificates, Client Certificate Key, and the Certificate Password. Ensure the .pem files are accessible and correctly linked in the publisher.
Data Transmission Issues:
If data isn't being sent as anticipated, confirm that the topics/addresses and command buttons in the Communication Manager tab are set up correctly.
URCap Installation Problems:
For any issues encountered during URCap installation, ensure you've followed the installation procedures correctly. The *.urcap file should be in the right directory, and PolyScope must be rebooted post-installation.
Certificate Errors:
For certificate-related errors, ensure all essential certificate files are available and appropriately linked. Verify the files are in the correct .pem format and that the paths in the publisher are set accurately.
URCaps Revision History | |
---|---|
Version | Notes |
1.0.1.0 1.0.2.0 | Initial release on new documentation standards. Included Quick start and Troubleshooting section. |
In this section: