Hai,
I am using a UR5e robot and i am trying to communicate with my Custom end-effector tool using rs485. As far as i have tried i am not able to find a way to access(send, receive data) that rs485 pin. Can anyone suggest a way to send commands to a robot end-effector via the rs485. Any help from your side would be of great help.
Thanks in advance,
sya
June 10, 2021, 4:25pm
2
Hi,
Suggest you read this thread and may give you some idea.
Anyone have an example of how to setup/read/write to the tool communications port in a URCap on e-series robot?
The “set_tool_communication” from the script manual seems strait forward. however, What are the commands to read and write to it?
1 Like
Thank you so much for your response @sya . It looks like URCap is the only way to read and write from rs485 tool communication.
sya
June 11, 2021, 1:56am
4
Hi @aswanthamang ,
It is not necessary to be the form of URCap but it cannot be achieved by Polyscope or ur script directly indeed so far.
Thanks
@sya
Thank you so much for your response. I will try with the daemon first.
Have a good day
I found an easy way to communicate with the rs485 port. And i have documented that elaborately below so that it might be easy for beginners to easily integrate their custom end-effectors in UR robots :-
Download the rs485.urcap file attached here rs485-1.0.urcap
rs485-1.0.urcap (138.7 KB)
Transfer the URCaps file to the Robot controller with the help of this reference:-
# Installing a URCap on a e-Series robot
For using the *ur_robot_driver* with a real robot you need to install the
**externalcontrol-x.x.x.urcap** which can be found inside
[here](https://github.com/UniversalRobots/Universal_Robots_ExternalControl_URCap/releases).
**Note**: For installing this URCap a minimal PolyScope version of 5.1 is necessary.
To install it you first have to copy it to the robot's **programs** folder which can be done either
via scp or using a USB stick.
On the welcome screen click on the hamburger menu in the top-right corner and select *Settings* to enter the robot's setup. There select *System* and then *URCaps* to enter the URCaps installation screen.
![Welcome screen of an e-Series robot](initial_setup_images/es_01_welcome.png)
There, click the little plus sign at the bottom to open the file selector. There you should see
all urcap files stored inside the robot's programs folder or a plugged USB drive. Select and open
the **externalcontrol-x.x.x.urcap** file and click *open*. Your URCaps view should now show the
**External Control** in the list of active URCaps and a notification to restart the robot. Do that
now.
This file has been truncated. show original
Once if the urcap file is loaded successfully you will be able see the output in the teach pendant saying that “RS-485 daemaon runs”
Once if that is achieved, Copy paste the following code in jupyter notebook or any other python programming interface to send and receive the data in TCI from remote port.
import socket
host = 'robot_ip'
port = 54321 # Remains the same, because it is specified as default port in URCaps code
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
s.sendall(b'Hello rs485 port from ash')
data = s.recv(1024)
s.close()
print('Received', repr(data))
References
https://www.tutorialspoint.com/python/python_networking.html → helped in socket python code
2) https://www.geeksforgeeks.org/socket-programming-python/ → helped in socket python code
GitHub - UniversalRobots/Universal_Robots_ToolComm_Forwarder_URCap: Utility to forward the UR Tool Communication Interface (RS-485) to a remote PC. → the urcap package that we used
GitHub - BomMadsen/URCap-ToolCommunicationInterface: URCap sample that demonstrates assuming control and using the RS485 TCI interface on e-Series robots. → gives a code level understanding of the URCap daemon (XmlRpc, /dev/ttyTool etc)
I Hope it helped!!!
6 Likes
system
Closed
June 22, 2021, 12:42pm
7
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.