Home Programming


Left ArrowBack to discussions page
PrasannaPrasanna Posts: 56 Apprentice
edited April 2019 in Programming

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.

Best Answers


  • PrasannaPrasanna Posts: 56 Apprentice
    Are you using the PC to send commands to the UR controller? yes
    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.
  • ZH2112ZH2112 Posts: 22 Apprentice
    Are you using same port numbers for both or does it have to be different? 
    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? 
  • PrasannaPrasanna Posts: 56 Apprentice
    Yes different ports. Am not controlling UR through PC. PC send the Motion commands to UR. robot coordinates are saved in excel sheet in csv format. 
    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
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    Is that in URScript?  If so, you need to add the third argument and name the sockets. Then you can send data to the named socket and close the named socket. 
  • PrasannaPrasanna Posts: 56 Apprentice
    I have tried by naming the sockets. also In Variables tab, Gripper socket remains true but still it gets disconnected when open PC socket.

    i cannot understand why the gripper socket getting disconnected when opening an another socket having different names, IP and Ports.
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    Not sure either, in the past we had multiple sockets open, sometimes 3 or 4, and never experienced that. Also, the socket variable will not change when the socket closes as it’s not connected to the socket. It’s just the return value from the socket open command saying whether the socket opened or not. Allows you to loop the socket until opened. 

    Can you send a screen screen shot of your code?
  • PrasannaPrasanna Posts: 56 Apprentice
  • PrasannaPrasanna Posts: 56 Apprentice
    when the glue dispense program runs, my gripper socket getting disconnected.
    Is there any way to prevent it?
  • PrasannaPrasanna Posts: 56 Apprentice
    Thanks for the answer.....Yes it is Working.....
  • matthewd92matthewd92 Founding Pro, Tactile Sensor Beta Testers Posts: 1,267 Handy
    Great to hear!
Sign In or Register to comment.
Left ArrowBack to discussions page