Universal Robots Forum

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

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.