Greetings URCommunity,
I am developing a C# app in which I would like to have a feedback from the robot on the state of inputs/outputs (i.e. to know every 2 seconds if the digital_in(1) is 0 or 1). I’ve managed to get the Joint Positions as well as the Base coordinate, but I can’t seem to find anything for getting the value of an input or output. Any help is much appreciated.
Best regards,
Pedro Monforte
Hello @PMonforte
What interface are you currently using to get the joint positions and base coordinates?
sko
Hi sko,
I know I was not very specific in the question, but I am quite new to this and thus have some issues explaining myself more appropriately. I have uploaded an image with the code part from which I get the Jointdata. It is through port 30013 (Real-Time interface, I think)
Any help is much appreciated
Best regards,
Pedro Monforte
I believe you would just use values 86 (digital inputs) and 131 (digital outputs) similar to how you have done the rest. These would just come as a byte where each bit represents their respective Input/Output.
Hello @PMonforte
Thank you for providing additional insights!
You can get a complete overview of our available interfaces and what data they hold in the correspondent support article.
There you can also find further documentation on the exact data streamed.
RTDE is the interface recommended by UR for efficiently reading data, such as inputs and outputs.
Then, since you’re in C#, if you want to go fast, you can take a look at this library, which does the connection handling and binary decoding for you, and offers you named RTDE objects of the right type in C#:
https://underautomation.com/universal-robots/documentation/rtde