The following document contains a description of how to install and use the MQTTspB Client URCap on Universal Robots Simulator application (URSim).URCap, MQTTspB and RTDE Clients.
To make use of this feature the following system requirements need to be met.
The URCap application consists in 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). The MQTT client, however, will not publish at the same rate. It will only publish new data if any variable had its value changed since the last reading.
MQTT: A lightweight, publish-subscribe network protocol that transports messages between devices. The SparkPlugB has additional control and standards allowing to know about birth, death and a better data exchange control. For more information on the SparkplugB specification, please refer to the official documentation.
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.
This new tool will be available after importing the *.urcap file and restarting the simulator.
There are three tabs: MQTT Broker Info, Communication Manager and License.
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.
To license your application, you need to create a softkey license which is generated by the equipment
SiteCode.
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.
Besides filling the configuration parameters manually at the PolyScope Installation Tab, it is also possible to 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> |
To make sure the file is loaded by the program, some things MUST be guaranteed:
The file will be parsed everytime the PolyScope is launched (as long as the URCap is already installed). You CAN NOT alter its information while the program is running.
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 everytime a Client is started or stopped. Also, a new file is created is 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 used is as follows:
Where:
<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 that a the variable customization 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 UDT’s (User-Defined Types). Click here to downlaod an example *.html file.
When the MQTTspB Client is started, if connected to the Broker, you should be able to see the Robot Model using a different Client. The images below illustrate the model with FRAMEWORXclient.
This section will detail how the DataStructure is modeled.
Can be customized with the XML file only.
String variables, that don’t exist in RTDE context.
String variables that do not exist in RTDE context.
String variables that don’t exist in RTDE context.
URCaps Revision History | |
---|---|
Version | Notes |
1.0.1.0 | Initial release on new documentation standards. |