This program was written by one of our lab techs to demonstrate the robot's ability to search in space for randomly placed objects...without the use of a complex Vision system. He writes an explanation of how it works:
1. Search each quadrant of space using the "skip condition" ("do until" on some other robots). When the robot stops on the exterior of the workpiece, store the location in a position register. The two pairs of opposite search lines must be in line with each other or the math won't be accurate enough.
2. Once the robot has "found" the object in four searches, you can compare the X and Y values and derive the difference between them. This will give you the distance BETWEEN the beep points.
3. Cut the distance between the beep points in half.
4. Create a new position register using X and Y coordinates of two beep points (one from each direction). Then modify these X and Y coordinates with the "distance between" measurement previously calculated. Essentially you're trying to change the location of the beep points so they will be located in the workpiece center instead of on the edge.
5. This new position register is the center of the workpiece. You can separately adjust the Z value as high or low as you wish. If you were picking up a round workpiece with a gripper, for instance, you could use your new position to easily grab it.
Using tool frames, you can mount the search hardware on the side of the end-of-arm-tooling, and simply modify the active frame in order for the gripper to interact with the workpiece. I didn't do that in this program but it's the next necessary step.
You can also use this probing routine to calculate the workpiece diameter (which I did in the video). You can normally do this using Pythagorean, but the robot may not be able to perform square root calculations, or power multiplication (# to the power of 1/2, etc). Instead, I calculated the diameter by creating a fifth search line using the calculated "center" position register as a landmark. When the robot finds the outside of the workpiece for the fifth time, it should be moving directly toward the center. Thus you should be able to take the fifth beep location, compare it to the center location, and figure the radius/diameter from them.
I took the diameter information and created some circular moves for demonstration.
I estimate that the accuracy of diameter measurement will depend primarily on the repeatability of your probing method. In this case I used a small prox switch but it is dependent on the density of the material and the distance from the switch. Your search plane must also be perfectly level compared to the robot's plane. You could take some measurements with test workpieces and add a "compensation" amount to make the robot calculated diameter more accurate. An optical switch would be ideal (many laser/plasma/waterjet routers use those).
Have fun!
14 окт 2024