Universal Robots Forum

RTDE | Sending INPUT

Dear Developers,

I am trying to figured out how does the RTDE conection is working. I had no problem to read outputs from server but I am not able to undestand how does the input works. I am not familiar with Python, so the example showed in guide doesn’t help at all.
I am using PC with Node-Red (Node.js) installed on as external device.
I am trying to just control a standard outputs.

This are steps, I have done already.


  1. Send RTDE_Request_Protocol_Version. I received proper message from server.

  2. Send RTDE_SETUP_INPUTS. Code below.
    Input setup
    Received message contain:

  3. Send RTDE_DATA_PACKAGE. Code below:

Input Data Package

I haven’t any response from server(what is correct basing on guide).
But unfortunetly digital output DO0 did not turn on.

I was trying also to send START commend before sending the Data Package, but it also made nothing,

Please help, what I am doing wrong?
Thanks in advance,

What does your payload for the input and output setup look like?

Our code which is in node as well looks something like this (old code and messy but it works):

rtde.connect(options, function(connected) {
  if (connected) {
    rtde.get_controller_version(version => {
        status => {
          if (!status) process.exit;
          //Setup the outputs
            result => {
              rtde.send_start(status => {
                if (status) {
                  logger.info('RTDE Started', {
                    ip: host,
                    stateOfRTDE: 'started',
                    module: 'startRTDE',
                  setRobotState({ rtde: 'started' });
                  receiveRTDEData(() => {
                    if (typeof callback == 'function') return callback();

That gives you the basic flow of how we are getting the connection established, starting the data stream and then receiving data from the stream.

Alslo, to have an external system control the outputs you will need to set the oputput bit mask to allow that, that is the RTDE packet standard_digital_output_mask, you will need to set the bits in the byte that you are trying to control remotely. This is the same as if you were using a PLC to control an output with Profinet or EIP.

Hi @mbush,

Thanks for your reply.

You can see an input setup at my first post. I am sending only input setup, should I send also output setup?

I do not understand fully what I have to do with standard_digital_output mask.

Suppose that I want to control DO0. In data stream that I am sending to RTDE server I have to include 2 informations: 1 for standard_digital_output and 1 for standard_digital_output_mask?

Hello ,I just test that you should set standard_digital_output mask and standard_digital_output at the same time, for example ,if you want to set standard_digital_output to 3 ,then you also need to set standard_digital_output mask to 3 ,