Hi,
I believe you are looking for something alike:
"""
TcpListener tcpListener = new TcpListener(ipAddress, nPort); // Create the tcp Listener
tcpListener.Start(); // Start listening
"""
This is extracted (2019-09-18 9h35) from Universal-Robots how-to articles for socket communication.
I would suggest you get a look at it:
https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/ethernet-socket-communication-via-urscript-15678/
The how-to articles available to all are one among all the gain of using Universal-Robots Cobots.
Here is the place to find all how-to articles:
https://www.universal-robots.com/how-tos-and-faqs/how-to/
Enjoy socket messaging on UR.
Regards,
David Gouffé
Integration Coach
Coach en intégration
Robotiq is now into packaging, palletizing and sanding applications. Learn more about our new Vacuum Grippers and the Robotiq Sanding Kit.
1-888-ROBOTIQ #275 (762-6847)
1-418-380-2788 #275 (Outside US and Canada)
1-418-655-9221 (Cell)
Follow us on
Visit us:
I am trying to get a UR5e to receive input from GageMAte software. The software is simulating an I/O board over TCP/IP. I am able to connect by opening a socket (socket_open("192.168.1.2",6000,socket_name="gagemate")). Commands that are sent (socket_send_line("NextEvent",socket_name="gagemate")) are received by GageMate and will be processed. When I try to get an input by sending a string (socket_send_line("Dio 2 ?",socket_name="gagemate")) I get no return, which I realize is because the robot is not expecting a response. Is there a script or command that will allow me to send a string/command and wait for a string to be returned?