UR has good example files written in Python at https://www.universal-robots.com/articles/ur/interface-communication/real-time-data-exchange-rtde-guide/
if you download the zip file at the bottom there are examples in that file. These are what we used to develop our servers from.
I would like to send information from the robot to my python program and back. Universal seems to have a pretty cool RTDE protocol for this, sadly I cannot for the life of me figure it out and there is no documentation. I manage to read all the variables, but not write.
I see that socket communication is also an option and that there is an open_socket command hidden in the documentation.
I just need the robot to tell my python script what it has picked up so that other equipment can perform some actions and confirm done. How would you guys go about this?