Real-Time Data Exchange (RTDE) Guide

Introduction

The Real-Time Data Exchange (RTDE) interface 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. This functionality is useful for interacting with fieldbus drivers (e.g., Ethernet/IP), manipulating robot I/O, and plotting robot status (e.g., robot trajectories). The RTDE interface is by default available when the UR controller is running.

The synchronization is configurable and can involve the following data:

  • Output: robot-, joint-, tool- and safety status, analog and digital I/O’s, and general-purpose output registers.

  • Input: digital and analog outputs and general-purpose input registers.

The RTDE functionality is split into two stages: a setup procedure and a synchronization loop. On connection to the RTDE interface, the client sets up the variables to be synchronized. The client sends a setup list of named input and output fields to be included in the data synchronization packages. This list is known as a recipe. Each successfully configured input recipe receives a unique recipe ID. Supported field names and their associated data types are listed below.

When the synchronization loop starts, the RTDE interface sends the requested data to the client in the specified order. The client sends updated inputs to the RTDE interface when values change. Data synchronization uses serialized binary data. Packages share a general structure with a header and a payload, if applicable.

Key Features

  • Real-time synchronization: The RTDE typically generates output messages at 125 Hz. However, if the controller lacks computational resources, it will skip some output packages and only send the most recent data.

  • Input messages: Variables in the controller can be updated via multiple messages. Inputs retain their last received value, and only one RTDE client can control a specific variable at any time.

  • Runtime environment: An RTDE client can run on the UR Control Box PC or any external PC. Running the RTDE client on the Control Box avoids network latency but may compete with the UR controller for resources.

  • Protocol changes: The RTDE protocol may be updated by UR. RTDE clients can request specific protocol versions to ensure compatibility.

Field Names and Associated Types

Robot Controller Inputs

Name

Type

Comment

Introduced in Version

speed_slider_mask

UINT32

0 = don’t change speed slider, 1 = use speed_slider_fraction to set speed slider value

speed_slider_fraction

DOUBLE

New speed slider value

standard_digital_output_mask

UINT8

Standard digital output bit mask

configurable_digital_output_mask

UINT8

Configurable digital output bit mask

standard_digital_output

UINT8

Standard digital outputs

configurable_digital_output

UINT8

Configurable digital outputs

standard_analog_output_mask

UINT8

Standard analog output mask (Bits 0-1: standard_analog_output_0 | standard_analog_output_1)

standard_analog_output_type

UINT8

Output domain {0=current[mA], 1=voltage[V]} (Bits 0-1: standard_analog_output_0 | standard_analog_output_1)

standard_analog_output_0

DOUBLE

Standard analog output 0 (ratio) [0..1]

standard_analog_output_1

DOUBLE

Standard analog output 1 (ratio) [0..1]

input_bit_registers0_to_31

UINT32

General purpose bits reserved for FieldBus/PLC interface usage

input_bit_registers32_to_63

UINT32

General purpose bits reserved for FieldBus/PLC interface usage

input_bit_register_X

BOOL

64 general purpose bits (X: [64..127]) reserved for external RTDE clients

3.9.0 / 5.3.0

input_int_register_X

INT32

48 general purpose integer registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0

input_double_register_X

DOUBLE

48 general purpose double registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0

external_force_torque

VECTOR6D

Input external wrench when using ft_rtde_input_enable builtin

3.3

Robot Controller Outputs

Name

Type

Comment

Introduced in Version

timestamp

DOUBLE

Time elapsed since the controller was started [s]

target_q

VECTOR6D

Target joint positions

target_qd

VECTOR6D

Target joint velocities

target_qdd

VECTOR6D

Target joint accelerations

target_current

VECTOR6D

Target joint currents

target_moment

VECTOR6D

Target joint moments (torques)

actual_q

VECTOR6D

Actual joint positions

actual_qd

VECTOR6D

Actual joint velocities

actual_current

VECTOR6D

Actual joint currents

joint_control_output

VECTOR6D

Joint control currents

actual_TCP_pose

VECTOR6D

Actual Cartesian coordinates of the tool: (x,y,z,rx,ry,rz)

actual_TCP_speed

VECTOR6D

Actual speed of the tool in Cartesian coordinates

actual_TCP_force

VECTOR6D

Generalized forces in the TCP

target_TCP_pose

VECTOR6D

Target Cartesian coordinates of the tool: (x,y,z,rx,ry,rz)

target_TCP_speed

VECTOR6D

Target speed of the tool in Cartesian coordinates

actual_digital_input_bits

UINT64

Current state of the digital inputs (0-7: Standard, 8-15: Configurable, 16-17: Tool)

joint_temperatures

VECTOR6D

Temperature of each joint in degrees Celsius

actual_execution_time

DOUBLE

Controller real-time thread execution time

robot_mode

INT32

Robot mode

joint_mode

VECTOR6INT32

Joint control modes

safety_mode

INT32

Safety mode

safety_status

INT32

Safety status

3.10.0 / 5.4.0

actual_tool_accelerometer

VECTOR3D

Tool x, y, and z accelerometer values

speed_scaling

DOUBLE

Speed scaling of the trajectory limiter

target_speed_fraction

DOUBLE

Target speed fraction

actual_momentum

DOUBLE

Norm of Cartesian linear momentum

actual_main_voltage

DOUBLE

Safety Control Board: Main voltage

actual_robot_voltage

DOUBLE

Safety Control Board: Robot voltage (48V)

actual_robot_current

DOUBLE

Safety Control Board: Robot current

actual_joint_voltage

VECTOR6D

Actual joint voltages

actual_digital_output_bits

UINT64

Current state of the digital outputs (0-7: Standard, 8-15: Configurable, 16-17: Tool)

runtime_state

UINT32

Program state

elbow_position

VECTOR3D

Position of robot elbow in Cartesian Base Coordinates

3.5.0 / 5.0.0

elbow_velocity

VECTOR3D

Velocity of robot elbow in Cartesian Base Coordinates

3.5.0 / 5.0.0

robot_status_bits

UINT32

Bits 0-3: Is power on, Is program running, Is teach button pressed, Is power button pressed

safety_status_bits

UINT32

Bits 0-10: Is normal mode, Is reduced mode, Is protective stopped, Is recovery mode, Is safeguard stopped, Is system emergency stopped, Is robot emergency stopped, Is emergency stopped, Is violation, Is fault, Is stopped due to safety

analog_io_types

UINT32

Bits 0-3: analog input 0, analog input 1, analog output 0, analog output 1 {0=current[mA], 1=voltage[V]}

standard_analog_input_0

DOUBLE

Standard analog input 0

standard_analog_input_1

DOUBLE

Standard analog input 1

standard_analog_output_0

DOUBLE

Standard analog output 0

standard_analog_output_1

DOUBLE

Standard analog output 1

input_bit_registers0_to_31

UINT32

General purpose bits reserved for FieldBus/PLC interface usage

input_bit_registers32_to_63

UINT32

General purpose bits reserved for FieldBus/PLC interface usage

input_bit_register_X

BOOL

64 general purpose bits (X: [64..127]) reserved for external RTDE clients

3.9.0 / 5.3.0

input_int_register_X

INT32

48 general purpose integer registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0

input_double_register_X

DOUBLE

48 general purpose double registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0

output_bit_registers0_to_31

UINT32

General purpose bits reserved for FieldBus/PLC interface usage

output_bit_registers32_to_63

UINT32

General purpose bits reserved for FieldBus/PLC interface usage

output_bit_register_X

BOOL

64 general purpose bits (X: [64..127]) reserved for external RTDE clients

3.9.0 / 5.3.0

output_int_register_X

INT32

48 general purpose integer registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0

output_double_register_X

DOUBLE

48 general purpose double registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0

output_bit_registers

UINT32

32 general purpose bits (0-31) reserved for FieldBus/PLC interface usage

3.4.0

output_int_register_X

INT32

48 general purpose integer registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0

output_double_register_X

DOUBLE

48 general purpose double registers (X: [0..23] reserved for FieldBus/PLC, [24..47] for external RTDE clients)

[0..23] 3.4.0 / [24..47] 3.9.0 / 5.3.0