Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UR10e script from RoboDK - buffer
I actualy work on a 3D printing project with an UR10e, and RoboDK is a great tool to help me to create longs programs. I used the "send program to robot" fonction in RoboDK, and I limited lines to send to 1000 in my post-processor , and in RoboDK configuration window. Everything works fine untill a new pack of lines has sent: the robot is locked, and it waits next line with the extruder on for 2 seconds(+/-) before to continue along the path.

I would like to know if it could be possible to prevent the robot to wait new pack of lines to exectute the program, and to avoid that the extruder is on. 

Thanks in advance for yours advices

I assume you are changing the variable MAX_LINES_X_PROG of the Universal Robots post processor. Correct?

It may be better to send the programs in smaller chunks, for example, 200 lines of code, so you don't have to wait so long for each chunk.

Hi Albert,

Thank you for your answer. Yes, every time I tried to reduce this defect, I changed both values. I followed your advice, but the result is the same. Is it possible to create a routine where lines executed could be overwrite by the new ones? Or, is it possible to send two differents pack of lines in UR queue, and overwrite the pack executed by the new one?

Thanks, Roberto
Hi Roberto,

I don't think you can start loading the next program while the previous program is being executed. If there is a way, we can help you implement it. This is open in our post processor and you can easily customize it.

Another option would be to use the driver. In this case you are executing one line at a time.

Hi Albert,
thanks for your suggestion. I don't have any idea if it is possible to send two packs of lines in UR polyscope 5.5. My actualy idea to solve this problem was to create main program script loop in UR controler with two folders where RoboDK could send lines each times to last folder has executed. In another solution, when you talk about use of driver, Is it "RUN ON ROBOT" fonction in RoboDK?
Hi Roberto,

When you want to use the driver you should set the run mode to "Run on robot" (in the API or the User interface).

The following code shows an example in Python that sends 2 raw lines of code to the robot to move to a target. It may require some coding to adjust it for your needs.

# Connect to the RoboDK API
RDK = Robolink()
robot = RDK.Item('UR5e', ITEM_TYPE_ROBOT)

# Retrieve the robot IP and port
ROBOT_HOST, ROBOT_PORT, remote_path, ftp_user, ftp_pass = robot.ConnectionParams()

# Override the port set in RoboDK (UR RTDE)
ROBOT_PORT = 30002

def driver_movej_pose(pose):    
   """Move a Universal Robot to the given target (in joints or Cartesian)"""
   # Move the robot to the desired pose in RoboDK
   # Retrieve the tool pose to update the robot
   pose_tool = robot.PoseTool()
   # Retrieve the robot joints to send (important to virtually move the robot there first)
   joints = robot.Joints()

   # Convert degrees to radians
   joints_rad = []
   for j in joints.list():
   # Send required information to the robot
   string = ""    
   x,y,z,u,v,w = Pose_2_UR(pose_tool)
   string += "set_tcp(p[%.6f,%.6f,%.6f,%.6f,%.6f,%.6f])\n" % (x*.001,y*.001,z*.001,u,v,w)
   string += "movej([%.6f,%.6f,%.6f,%.6f,%.6f,%.6f])\n" % tuple(joints_rad)

   s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
   ROBOT_PORT = 30002
   s.connect((ROBOT_HOST, ROBOT_PORT))    
   received = s.recv(4096)

   #from rtde import serialize
   #returned = serialize.Message.unpack(received)


# Test moving the robot to the position defined in RoboDK
Hi Albert,
I tried to use the RUN ON ROBOT fonction at beginning, but the stream between each line is very slow. On 3D printing application, the toolpath generates a sequence of smallest linear movements, and the slow streaming causes blob effect extrusion. Maybe, your code should help me to solve this problem. How can I use this code? Do it replaces driver? Sorry, but I really don't know where I do implement it.

Other questions: On UR e-series, real-time connection runs to 500hz to exchange informations between client and server. Is it possible to use port number 30003 to send a pack of lines with SEND PROGRAM TO ROBOT fonction ? Perhaps, is it the problem that causes slow streaming of lines?

Thanks for your help.



Users browsing this thread:
1 Guest(s)