RTDE communication issues

Hi everyone,

I’m trying to implement a RTDE communication with a robot to modify it’s boolean registers.
But when I start my python script, I get the following error :

Here is the code sample where the error is raised :

In the configuration file, I only have two recipes : “output” and “input” respectively for “output_bit_registers0_to_31” and “input_bit_registers0_to_31” and both types of UINT32

What am I doing wrong do get this error, and how to resolve this problem ?
Thanks in advance.

I suppose something is wrong with configuration file.
Try passing list of register names, and types directly, instead of reading it from a file.
like:
send_output_setup(['output_bit_registers0_to_31'], ['UINT32'])

It’s also recommended to use bit registers >= 64 for external applications, as registers in lower range are automatically reserved when fieldbus is enabled. However that functionality is available in software 3.9/5.3 onward.

1 Like

thanks for this quick response !

I’ve tried what you said, and also tried to modify a register.
I’ve followed the “example_control_loop.py” script given in the RTDE guide :
https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/

afterthat I got the error “Bool object has no attribute output_bit_register_10”, so I modified my code to use precisely this register and of course it did not work.

But now that I get back before this modification, I got the error “unable to negociate protocol version” wich I know is related to the RTDE protocol version used by my script and the one used by the robot.

As I used the example given in the RTDE guide, the script uses the version 2 of the RTDE protocol, but I checked the version of the robot with the “ctrl + alt + f10” command and see that the robot uses the version 1, but it’s on the 3.10 version of the software

How can I update the version of RTDE on the robot ?
and how can I solve the “Bool object has no attribute output_bit_register_X” error to modify the registers ?

It’s definitely RTDE 2 if you have software 3.10. RTDE server version is tied to Robot software version.
Just download latest RTDE client example from support site, and check if record.py works with your setup.
You can also try it out with simulator, that way you can check compatibility with different software versions.

Hello,
sorry my bad
I’ve check again the version of RTDE and now it’s on the version 2.

But I still don’t know how to modify the registers,
When I directly use the name and type of the registers, I got the error 'Bool object has no attribute ‘output_bit_register_10’
and when I try to use directly the register 10, I get back to the first error.

How can I send this to the robot to modify the registers ?

also, here is what the config file I used before passing directly the names and types looks like :
config%20file

From the documentation at https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/

output_bit_register_ X X: [64…127] - The upper range of the boolean output registers can be used by external RTDE clients (i.e URCAPS).|3.9.0 / 5.3.0|

So your index should be in the range 64 to 127

thanks for all your answers,

It’s seems to work for now !

so I come back to you, because after a test with the robot, I can’t find those registers.

I forgot to mentionned that I use PROFINET registers.

Are those registers we’re talking about different from PROFINET registers ?
and is it possible to modify PROFINET register with the RTDE protocol from an external RTDE client ?

From https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/profinet-guide-20596/
You can read that:

The upper range (bool[64:127], int[23:47], float[23:47]) can be used by external RTDE clients (i.e URCAPS)
So they are not different and they can be modified by external RTDE clients.