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). Ithinkthe 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.
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.
10-11-2018, 04:44 AM(This post was last modified: 10-11-2018, 05:11 AM byRBE.)
Hi Jeremy.
我有看你的例子,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...
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.
10-24-2018, 06:37 PM(This post was last modified: 10-24-2018, 06:39 PM byRBE.)
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:
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...
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.
@JeremyAre 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...
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.