Universal Robots Forum

How to process package recieved from port 30002 in Python


I’ve recently been trying to receive robot readings from port 30002 using Sockets in Python. I’ve looked into how to process the package received in this thread here:

But the code examples posted are outdated and leaves me with errors.
I’ve also looked into the client_Interfaces.xlsx, but it seems to be outdated perhaps too?

Anyways, i am trying to receive readings on the Robot mode data, more specifically to check for protective stop.
How would i go about processing the package with the Struct librabry in python 3?
Or if someone could explain to me how to unpack the data stream from port 30002 that would be of great help too!

I have Solved the issue. If anyone stumbles upon the same problem, i would gladly share my implementation

Great to hear you’ve resolved it. Was it just a case of updating the indices to reflect the current data structure?

Yes that was exactly the problem.