Universal Robots Forum

Communication TCP/IP with windows form (c#)

Hello,

I developed the program for a screwing cell with a UR5 (ip: 192.168.1.1)
The cobot program have different variables which allow me to supervise the production. However I have to retrieve its values ​​manually to update my dashboard.

I would like to automate the data recovery by creating an application widows form (C#) with visual studio. However, I have a problem by creating communication between the cobot and the software.
I just want understand how to create the communication, thanks to that I will continue the development of my application.

The principle :
the cobot sends " My_Socket" : Nb_Produit;Nb_Defaut;Val_Couple ==> for example (5264;8;1345)
socket_open(“192.168.1.159”, 2400, “socket_2400”)
socket_send_string(“My_socket”, socket_2400)
socket_close(“socket_2400”)

The application receives “My_Socket” on port 2400

Do you have an example of C# code to retrieve a socket from the cobot?

Could one of you maybe help me with this or point me in the right direction?

Best regards,
Quentin,