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

Using Python in RoboDK to change the TCP of a tool before every use

#1
Hi,
I am working on a machining station using UR10e and various pneumatic tools being switched using smart shifts. I have pneumatic grinder with a cutting disc. As the cutting abrasive disc gets smaller and smaller during each operation. I have placed a IR sensor in the station. I want the robot to pick up the tool and move the disc across the IR sensor. And from a set starting point(the normal Disc size - Set starting point) to when the IR sensor is triggered, and calculate the change in distance and set the new TCP. But i couldn't find any such examples in roboDK.


Attached Files
.rdk   Station_machining_V3.rdk (Size: 12.63 MB / Downloads: 136)
#2
You can use the collision detection function to detect the disc edge and then calculate its radius with Collision(item1item2). 

https://robodk.com/doc/en/PythonAPI/robo....Collision

You can find an example attached of TCP position detection using the collision feature of RoboDK in a python script. You can call the python script with the name of the disc (object) you want to calculate.


Attached Files
.rdk   Adjust_TCP.rdk (Size: 3.63 MB / Downloads: 132)
#3
Hey Oliver,
Thank you so much for the reply and the program. That really helped and I am trying to add with my current program and testing it out.
#4
Hey Oliver,

Thank you for the response. I tried adding the TCP change program into my workstation. But for some reason the calculated TCP is too  big. Like the grinding disc i have given in my station in R-63.5mm but when i run the program it shows 554.0000001mm. I have attached a screenshot of the output it shows in my station and also the station itself. Please have a look at it and suggest some solution.


Attached Files Thumbnail(s)
   

.rdk   Station_machining_V4_nordbo_SS_Switch.rdk (Size: 14.1 MB / Downloads: 116)
#5
Also how will i configure the sensor when sending the program to the robot and I couldn't send the python script to the robot.
  




Users browsing this thread:
1 Guest(s)