Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatic tool changers in RoboDK
Hi All.

I have an automatic tool changer I am attempting to use from within RoboDK. It consists of a master plate that is permanently attached to the UR5 tool flange, and a number of slave tools that may be attached and detached from the master plate using pneumatics.

I have written a couple of functions to pick up a tool from the tool stand where the slave tools are stored and then deposit the tool back. The problem I am facing is that I cannot figure out how to take a slave tool that is attached to the robot, detach it from the master, and leave it in the tool stand (ie attach it back to the appropriate tool stand reference). I think the answer involves converting the slave tool to an object when detaching, and then converting it back to a tool when attaching, but I am not sure if this is correct, or how to do it.

Any suggestions?

Attached Files
.rdk   UR5 Tool Testing.rdk (Size: 1.39 MB / Downloads: 54)
Hi RBE, 

You are right about the problem, it’s causes by the fact that a tool cannot be detached from its robot. We will create a macro in the near future to address that specific tool changer situation.

In the meantime, I found a quick and simplistic fix for you. See the attached project. What I did was to create a copy of the tool on the tool rack and I hid the tool attached to the robot (uncheck Visibility). In your program, I replaced the ‘’attach’’ command by a ‘’Show’’ and a ‘’Hide’’ command. When the robot reaches the tool rack, I ‘’Show’’ the tool attached to the robot and I ‘’Hide’’ the tool on the tool rack.
I did the opposite with the ‘’detach’’ command.

You can now do the exact same thing for the last three tools.
Hope it helps. Like I said, we are going to work on a better solution using a macro in the future.


Attached Files Thumbnail(s)

.rdk   UR5 Tool Testing - Hide tool.rdk (Size: 1.58 MB / Downloads: 34)
Hi Jeremy.

I have had a look at your example and am having trouble replicating it. How exactly did you manage to get the copy of the Lux Tool Assy that you created (ie "Lux Tool Assy Changer") to behave as a tool rather than as a simple object?

I have saved the Lux Tool Assy that sits in the UR5 tree out as a tool file with the appropriate TCP and geometry offset information, but when I try to attach a copy of the tool to the Lux Tool Assy Top frame however (by right-clicking and selecting Add Item) , it converts back to a simple object...
Hi RBE, 

I just copy and past it from the UR tree to the ''Lux Tool Assy'' reference frame (all directly in RoboDK). Doing so kept the tool format. But honestly, I don’t see where is the problem with having it has an object. In the end, the tool sitting on the support is there only for visual representation, you don’t really use it. You just show it when the tool is not attached to the robot flange.

Like I said in my first response, it’s a simplistic fix to your problem. We’ll come up with a macro in the future to manage a tool changer.

Let us know how it goes.
Hi Jeremy.

Perhaps you can shed some light on my current issue. In essence I am trying to use Python to create a station program to do something similar to what has been previously discussed:

def add_grinder_attach_program():
   grinder_tool_attach = RDK.AddProgram('Grinder Tool Attach')    
   grinder_tool_attach.setPoseFrame(RDK.Item('Grinder Tool Top', ITEM_TYPE_FRAME))
   grinder_tool_attach.setPoseTool(RDK.Item('Master Tool', ITEM_TYPE_TOOL))
   grinder_tool_attach.MoveJ(RDK.Item('Grinder Tool Approach', ITEM_TYPE_TARGET))
   grinder_tool_attach.MoveL(RDK.Item('Grinder Tool Aligned', ITEM_TYPE_TARGET))
   grinder_tool_attach.MoveL(RDK.Item('Grinder Tool Inserted', ITEM_TYPE_TARGET))
   grinder_tool_attach.setDO(ATTACH_TOOL, 1)
   grinder_tool_attach.MoveL(RDK.Item('Grinder Tool Mated', ITEM_TYPE_TARGET))
   grinder_tool = RDK.Item('Grinder Tool', ITEM_TYPE_TOOL)
   grinder_tool.setVisible(True, True)
   grinder_tool = RDK.Item('Grinder Tool', ITEM_TYPE_OBJECT)
   grinder_tool_attach.MoveL(RDK.Item('Grinder Tool Aligned', ITEM_TYPE_TARGET))
   grinder_tool_attach.MoveJ(RDK.Item('Grinder Tool Approach', ITEM_TYPE_TARGET))
   grinder_tool_attach.setPoseTool(RDK.Item('Grinder Tool', ITEM_TYPE_TOOL))
   grinder_tool_attach.setPoseFrame(RDK.Item('UR5 2014350238 Base', ITEM_TYPE_FRAME))

At present the program works fine, bar the fact that the grinder tool (a tool attached to the robot) is not shown, nor is the grinder tool (an object attached to the tool stand) hidden. How does one associate an item .setVisible instruction with a program? When doing this via the RoboDK GUI I would use a simulation event - not quite sure how to do the same thing here...

Can you send me a copy of the station ? (With all the tool geometry and other object needed.)

Hi Jeremy.

I have attached the current station to this message - please note that it is a work in progress. In order to run the Python script included with the station, you will need to first create a 'C:/RoboDK/User' directory, and then copy the entire content of the .zip archive into it. You should then be able to run the script successfully.

Attached Files
.zip   Work in (Size: 8.67 MB / Downloads: 25)
@Jeremy Are you able to state whether there is a way to include a simulation event instruction in a Python script that is used to generate a RoboDK program? I have yet to find a solution to this issue, as it does not appear that the Robolink module has the necessary capability...
This is possible using:

More information here:

prog = RDK.ItemUserPick("Select a program to generate", ITEM_TYPE_PROGRAM)
Hi @Albert.

Thank you for your reply, but that is not what I meant. I am talking about using Python to create a program for use within the RoboDK environment itself. For example:


As can be seen from this image of a station tree, there is a simulation event within the 'Grinder Tool Attach' program to hide the grinder tool that sits in the tool stand, and another simulation event that shows the grinder tool that is attached to the robot. In this case, the 'Grinder Tool Attach' program was written within RoboDK using the GUI. Now however what I need to be able to do is insert simulation events into a version of the program that I have being generated by a Python script. As before, the 'Grinder Tool Attach' program will be run in simulation from within RoboDK.

Users browsing this thread:
1 Guest(s)