Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

[HELP] Tool changer with Mechanism

#1
Hi guys!

What I'm basically looking for is a solution on making a tool changer in RoboDK.
I've already saw this post://www.sinclairbody.com/forum/Thread-Automati...-in-RoboDK

And I'm pretty much doing the same thing asJeremysuggested in his post (hiding one object, then showing the other object and etc.), but in my case, I have amechanismon the robot's flange (fork tool) and I can't simply Show/Hide aMechanism. Meaning that RoboDK allows me to Show/Hide onlyObjectsandTools, butnot Mechanisms.

The thing is, the fork tool is consisted of two parts: One stationary part (that connects to the robot) and one moving part (the fork itself). And in order to move the fork forward/backward, I have to make it like a Mechanism (1 linear axis), right? That's the case. If I make it like an mechanism,
If there's a way to make a tool in RoboDK, that has an attached Mechanism on it, that would be great. But i don't think there is one (Please, correct me if I'm wrong)

I've attached my project.
Adler


Attached Files
.rdk RV-35F (sus novi pozicii).rdk(Size: 12.11 MB / Downloads: 280)
#2
Hi AdlerAdemov,

I made two python scripts, one that hide the mechanism and another one that show it, you can call these scripts with the Program Call Instruction.

Olivier


Attached Files
.rdk RV-35F (sus novi pozicii).rdk(Size: 12.14 MB / Downloads: 307)
#3
(03-12-2021, 03:20 PM)Olivier Wrote:Hi AdlerAdemov,

I made two python scripts, one that hide the mechanism and another one that show it, you can call these scripts with the Program Call Instruction.

Olivier

Thank you, Olivier. I've gave it a try and it worked like a charm .

Although it worked, when I hide it, then show it, thereference frameand thetarget positionsfor opening/closing the fork tool are visible.
Can we hide them somehow after hide/show sequence?

Picture of the reference frame with the mechanism and the target positions (closed/open):
[Image: robo-DK-Tool-changer-with-Mechanism-issu...w-hide.png]

自从我在项目的进展更,我've attached it again. You can find your Python code in folderTool Changer-->Python to Show/Hide Fork Tool.

Thank you, once more :)


Attached Files
.rdk RV-35F (after Oliviers python snippet).rdk(Size: 14.57 MB / Downloads: 278)
#4
Hi AdlerAdemov,

The way the python script work at the moment is it hide/show everything inside the reference frame.

Option A : You can put the targets inside a separate reference frame.

Option B : You can modify the pythonscriptto hide/show only the mechanism :

fromrobolinkimport*# RoboDK API
fromrobodkimport*# Robot toolbox
frommathimport*
RDK = Robolink()

MechanismToHide = RDK.Item("My Mechanism",itemtype=ITEM_TYPE_ROBOT)
MechanismToHide.setVisible(1)
#With 1 to set it visible or 0 to set it invisible.


Olivier
#5
Hi Adler,

Or you can just hide them manually from the get-go.
Right-click on it in the station tree and "Visible".

You don't really need to see those at any point anyway.

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#6
(03-15-2021, 06:44 PM)Olivier Wrote: Hi AdlerAdemov,

The way the python script work at the moment is it hide/show everything inside the reference frame.

Option A : You can put the targets inside a separate reference frame.

Option B : You can modify the pythonscriptto hide/show only the mechanism :

fromrobolinkimport*# RoboDK API
fromrobodkimport*# Robot toolbox
frommathimport*
RDK = Robolink()

MechanismToHide = RDK.Item("My Mechanism",itemtype=ITEM_TYPE_ROBOT)
MechanismToHide.setVisible(1)
#With 1 to set it visible or 0 to set it invisible.


Olivier

(03-15-2021, 07:55 PM)Jeremy Wrote:Hi Adler,

Or you can just hide them manually from the get-go.
Right-click on it in the station tree and "Visible".

You don't really need to see those at any point anyway.

Jeremy

Hey guys. Yeah, I've went through some of the Python API documentation earlier and I've realized that I can simply show/hide only theMechanism本身。所以我试着两个选项(手动unchecking the "Visible" checkbox and automatically hide the reference frame from the Python itself). Python now does exactly what i want it to do.
Pretty easy.Worked.

I should've read some of the documentation earlier, buuuut... you know what's up when project deadline is literally in the next morning.

Thanks once more.
#7
I havecompletedthe project we wanted to do and I'm uploading it here. Sharing is caring :)


Attached Files
.rdk RV-35F (vacuum and fork demo).rdk(Size: 14.59 MB / Downloads: 287)
#8
Nice demo. Very cool.

Small thing to improve your experience.

"Tools"->"Options"->"Display"->"Simplify Objects"->Select the robot.

That will simplify the 3D model of the robot a bit and increase the frame rate quite a bit (it tripled it on my end, from 20 FPS, to 60 FPS).
You can see the frame rate by going to "Tools"->"Options"->"Display"->"Display text on screen"->"Render time".

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.


#9
That actually helped, when I've presented the demo on a slower PC. ThanksJeremy!

It comes to my attention, that I can't see the FPS counter anywhere. I've checked the instruction and I know where should i expect it to pop out, but it doesn't appear at all.
#10
If you are using the "opaque tree", it won't appear I think.

Jeremy
Find useful information about RoboDK and its features by visiting our2022世界杯32强赛程表时间 and by watching tutorials on ourYoutube Channel.






Users browsing this thread:
1 Guest(s)