DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
BeachChE

Sebastien, one of the things you have to be aware of is the the units between the camera and UR are different. Camera will be in meters for X, Y, and Z and the UR is in mm. Also the rotation angle is in degrees in the camera and Rads in the UR. I run the camera loop in a thread so that it finds the part and holds the coordinates until they are asked for.  I use this thread on 3 Cognex cameras now and will be adding a 4th. Here is my thread.

   Thread_4
     'Camera 1  Program Start'
     If Thread_1≟1
       Set Camera_1_Trig=Off
       Zero_Pos≔[0,0,0,0]
       Socket_Test_1≔ False 
       Wait: 0.3
         Loop Socket_Test_1≟ False 
           Socket_Test_1=socket_open("192.168.1.18",3010,"socket_1")
           Wait: 1.0
         Set Camera_1_Trig=On
         Wait: 0.2
         Set Camera_1_Trig=Off
         Wait: 0.2
         If Socket_Test_1≟ True 
           Result_1≔socket_read_ascii_float(3,"socket_1")
           Wait: 0.2
           Set Pic_Cntr=Pic_Cntr+1
         Wait: 0.2
         If Result_1[0]≟3
           Pic_Cntr≔0
           new_pos_1≔p[((Result_1[2]+25)/1000),((Result_1[1]+50)/1000),0,0,0,((-Result_1[3]+180)*3.14159/180)]
           socket_close("socket_1")
           Socket_Test_1≔ False 
           'Thread_1≔0'

The Pic_Cntr is a variable I use to prevent the camera and robot from sitting there and trying to find a part forever. If it goes above 20 tries, I trigger a popup and lights on an andon stack.

I hope this helps.