Home› Programming
Discussion
Back to discussions page
Prasanna
Posts: 56 Apprentice
Error in "Socket_Open" |
1.1K views
|
Answered | |
/ Most recent by matthewd92
in Programming
|
12 comments |

Hi,
Am using UR3 e series controller.
PC, Gripper and Robot all connected through socket using different IP address and ports.
In my robot program, if i open the PC socket, then my Gripper socket will get disconnected and my gripper lost its grip on the object.
i cannot use "Socket_close", it will close all the sockets so again my gripper will lose the job.
i do not know what am missing.
Am using UR3 e series controller.
PC, Gripper and Robot all connected through socket using different IP address and ports.
In my robot program, if i open the PC socket, then my Gripper socket will get disconnected and my gripper lost its grip on the object.
i cannot use "Socket_close", it will close all the sockets so again my gripper will lose the job.
i do not know what am missing.
Tagged:
Best Answers
-
matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
Yes, add a name to the socket command.
Socket_open(host, port, name)
socket_open(host2,port2,name2)
socket_send_string(string,name)
socket_send_string(string,name2)
By not providing a unique name at open the default name is used and so when you open the other socket it overwrites the original socket that was opened.
1. PC =socket_open("IP", Port)
2. Grip =socket_open("IP", Port)
when i open the PC socket, my grip socket gets disconnected and my gripper drops the object. The object is lens and very fragile.
Sorry but I'm curious to why you would be using a PC for controlling UR. Wouldn't uploading a script at its teach pendant easier?
1. PC send X, Y and Z co ordinates to robot using C#
2. Robot Receives via socket and move to the particular position.
3. Then robot Give (Open or close) commands to Gripper to pick and place the object.
Problem is Robot to gripper socket connection.
1. when i use socket_close commands both sockets are closing.
2. when i open PC socket my gripper socket is getting closed. and gripper drops the job
Hope it is clear now
i cannot understand why the gripper socket getting disconnected when opening an another socket having different names, IP and Ports.
Can you send a screen screen shot of your code?
Is there any way to prevent it?