Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automatic tool changers in RoboDK
#5
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:


Code:
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。Pause(500)

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.setVisible(False)

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))

return


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...


Messages In This Thread
Automatic tool changers in RoboDK - byRBE- 10-09-2018, 07:29 PM
RE: Automatic tool changers in RoboDK - byJeremy- 10-10-2018, 02:28 PM
RE: Automatic tool changers in RoboDK - byRBE- 10-11-2018, 04:44 AM
RE: Automatic tool changers in RoboDK - byJeremy- 10-11-2018, 02:21 PM
RE: Automatic tool changers in RoboDK - byRBE- 10-24-2018, 06:37 PM
RE: Automatic tool changers in RoboDK - byJeremy- 10-24-2018, 07:43 PM
RE: Automatic tool changers in RoboDK - byRBE- 10-25-2018, 02:29 AM
RE: Automatic tool changers in RoboDK - byRBE- 10-30-2018, 06:51 PM
RE: Automatic tool changers in RoboDK - byAlbert- 10-31-2018, 10:53 AM
RE: Automatic tool changers in RoboDK - byRBE- 10-31-2018, 09:18 PM
RE: Automatic tool changers in RoboDK - byJeremy- 11-01-2018, 02:04 PM



Users browsing this thread:
1 Guest(s)