Hello everyone,
I managed to connect my windows Pc with my ur3e and now I can read all kinds of data using the following Python script:
What I do is, I read the tcp pose and the timestamp and convert it into csv file, while my robot runs a URscript, where it drives from waypoint to waypoint.
My URScript works perfectly fine, and a local int variable “counter” counts after every loop. Now I want to read the variable the same way I do with the tcp pose and add it into the csv file.
It seams like to achieve my goal I should use the I/O Setup in the installation tab and read the output register, but I’ve only been able to receive 0 and 1 and not my local int variable.
Am I on the right path, or should I try something else.
I would be glad for any kind of help
Best regards,
Jemsey
Hi Jemsey,
I think there is no need to use the I/O Setup in the installation tab.
If from your URscript you write the counter variable in a general purpose output integer register, let’s say register 24:
write_output_integer_register(24, counter)
then you should be able to read it from the RTDE client looking for the rtde output output_int_register_24
.
I’ve never used the python client but this is what I do with my client written in C++.
I hope I have correctly understood your question
Hi Claudia,
thanks al lot you really helped me out, this is exactly what I needed. It works all perfectly fine now, thanks again.
Best regards,
Jemsey
Hi Claudia,
do you know how to read a double type variable in the same way? Meanwhile, the variable changes in a high frequency because it is the statics got from an F/T sensor. Looking forward to your reply!!! Thanks a lot!!!
Hi,
if the sensor you are using is writing an RTDE input (or output) register, for example register 24 as above , you can read it from URScript using the function read_input_float_register(24), or read_output_float_register(24) if the sensor writes on an output register.
Otherwise from an external RTDE client you should look for the variables input_double_register_24 or output_double_register_24
thank you! I will have a try!