Serial communication / Tool RS485 failed after reconnect

Serial communication failed: I have problems with serial communication (RS485).

I have expanded the com.ur.urcap.examples.mydaemonswing example to include serial communication (Python).
Simulation URSim: I connected my external device to my laptop with a USB serial adapter. I start ursim with sudo ./start-ursim.sh.
With the start / stop buttons in the URCap I can successfully start / stop the connection (daemon + serial communication). Read / write data works. I can try this several times successfully.

Real life on the robot: I can successfully start daemon and also get serial communication. Read / write data works. However, if I stop the process and then start it again, I have problems with serial communication. My Python script is no longer accessible and I get exceptions (xmlRpcDaemonInterface.isReachable () => catch XmlRpcException. The daemon process indicates that it was successfully executed.

Robot version: UR10e with UR software 5.7.0.90932

Has anyone had similar problems?

I have done RS485 communication through a daemon like you. It sound like the daemon is hanging on the stop process and does not close at all. I would suggest making a test button to stop and start the daemon to test it.

Although i have not experienced the same error as you i have had some small trouble starting the daemon automatically.

After digging a bit into this issue, I was able to reproduce the behavior and found a possible cause. It seems to be connected with the selected Parity Bit set in the Python Daemon, which uses PySerial. If it is set to NONE, the communication can be re-established on the real robot. If set to e.g. EVEN, it can only be established once and an class termios error 22 invalid argument Error was thrown by the daemon.

We are continuing to investigate this issue.

I am trying to send commands over RS485 to the tool IO. Can someone share a Daemon that I can load in the controller that will allow me to send commands?

I just want to start by sending “Hello World” and receive that message out the tool IO. Actually, to be honest, I want to send that message from a script within a UR program running on the robot and receive that message on a device connected at the Tool IO.

Hi @christian.mackin

You can take a look at this post

I hope that you will be able adjust the daemon for your needs.