It's been a while since I've been active on this forum, but I thought I'd come back with a useful tip I've learned about using position registers as tool offsets. In the course of programming these robots, I'm sure many of you have noticed a pattern in the motion when it comes to interacting with fixtures and parts. You may have different terminology for it, but I'm sure it looks the same:
[list type=decimal]
- Large move to locate the end effector in the vicinity of the work
- Moderate move to locate end effector to a "perch" position closer to the work (and sometimes wait)
- Low speed move to actually do the work (pick, place, whatever)
[/list]
And then the reverse when the work is done.
Now if you're not using offsets at all, that's at least three separate points to be taught right there. Stop doing it this way. If you use nothing else from this post, at the very least start using the Offset,PR[] motion modifier to simplify your life. But, Offset, PR[] is not what this tip is about. Today I'm talking about the Tool_Offset,PR[] motion modifier. In my experience, I have not seen this modifier used nearly as often as the regular user frame offset. This may be due to the slightly confusing requirement to re-orient yourself to the tool's frame instead of the workpiece. It may be a lack of explanation on how to use it in training and documentation. But in my experience, Tool_Offset will be a better choice to use in most situations where an average programmer would deploy just a standard Offset.
Why? Well because of four major reasons:
[list type=decimal]
- Motion will always be in line with the TCP. This may seem trivial, but honestly ask yourself when the last time you had a TCP and a user frame line up perfectly when picking from a fixture. If you're pulling something out of a pocket, chances are your tool is lined up better with that pocket than the three point frame you taught. This means no dragging.
- It works great with tracking and vision, which can't always be said of the regular offset option.
- Similarly, tool offsets work on top of regular offsets. So for example, you could be picking from an array with known geometry. Your taught point would be the first position. The offset could be calculated for all of the other positions. You tool offsets will handle your approach, perch and work moves.
- Lastly, there's an incredibly easy hack to set up perfect tool offsets every single time that doesn't require you to type in any numbers or make a guess at how far to move. And that's what this tip is about.
[/list]
Okay enough blathering. Here's the tip. Making sure that you're in the correct tool frame, teach the final point for your work piece. When I say final point, I mean teach the point where the part is fully inserted into the fixture or similar. In other words, the point where the robot will stop going forwards and begin working backwards. This is your reference point and this is the only point you'll ever have to teach or modify again after doing this. With the robot in this position do the following:
[list type=decimal]
- Go to your user frame settings. Find an unused user frame. (If they're all being used, temporarily store one in a position register)
- Switch the method for teaching the frame to direct entry and then record the point as the user frame. (SHIFT + F5)
- Switch over to that user frame and then check your position in USER. If you did it right, it should all be 0.
- Staying in those User & Tool frames, go to your position registers.
- Start jogging the robot out of the workspace/fixture/whatever and record each position as a new PR.
[/list]
And that's it. You can now switch back to your regularly scheduled user frame. Each of those recorded PRs will now work as a Tool_Offset,PR[...] to get your robot safely in and out of that fixture without a lot of touchup. You can delete the temporary user frame we created as it won't be needed in the program. (If you ever need it back, just move back to that position and repeat the above process.) Why is this a big deal? Well... an example for you: I just completed work on a job that required assembly to be done while the parts were being tracked on a moving conveyor using PickTool. Each of those assembly steps were programmed as tool offsets. This allowed me to teach the actual assembly motion while the conveyor was standing still in a completely arbitrary location. Then when it came time to run the thing I just had to touch-up PR[59] (you poor bastards who use PickTool will immediately recognize that infamous PR) and the rest of my moves came along with it. Here's how that code looks:
74: --eg: Move to drop pos ;
75:L PR[59:Dp1 Cv Ref Pos] max_speed CNT5 VOFFSET,VR[2] Tool_Offset,PR[31:Perch] ;
76: ;
77: !---Insert----------------------- ;
78:L PR[59:Dp1 Cv Ref Pos] max_speed CNT0 VOFFSET,VR[2] TA .01sec,RO[4:ON :Retract]=ON AP_LD30 ;
79: !------------------------------- ;
80: ;
81:L PR[59:Dp1 Cv Ref Pos] max_speed CNT100 VOFFSET,VR[2] Tool_Offset,PR[32:1] ;
82:L PR[59:Dp1 Cv Ref Pos] max_speed CNT100 VOFFSET,VR[2] Tool_Offset,PR[33:2] ;
83:L PR[59:Dp1 Cv Ref Pos] max_speed CNT100 VOFFSET,VR[2] Tool_Offset,PR[34:3] ;
84:L PR[59:Dp1 Cv Ref Pos] max_speed CNT100 VOFFSET,VR[2] Tool_Offset,PR[35:4] ;
85:L PR[59:Dp1 Cv Ref Pos] max_speed CNT100 VOFFSET,VR[2] Tool_Offset,PR[36:5] ;
86:L PR[59:Dp1 Cv Ref Pos] max_speed CNT100 VOFFSET,VR[2] Tool_Offset,PR[37:6] ;
87: ;
88: !---Final---------------------- ;
89:L PR[59:Dp1 Cv Ref Pos] max_speed CNT1 VOFFSET,VR[2] Tool_Offset,PR[38:Final] ACC70 TB R[145]sec,CALL PKGROPEN("Gripper ID"=R[104:Gripper Id G1],"Start Zone"=R[107:Counter G1],"End Zone"=R[106:Gr EndZone G1]) ;
90: !------------------------------- ;
Display More
Nine distinct moves and only one taught point.
Another good example is if you have a commonly used component that requires the same motions every time you use it. My shop uses ATI tool changers with tool stands. The same tool stands every time. I know that when I lock onto the tool, I have to tilt it in the tool's Y axis slightly, and move a couple mm in the X axis to clear the stand. But I don't have to waste time thinking about it because that's a tool offset that I taught manually using my above method just once, and I've used it on every job thereafter successfully. And If your mechanical engineers like to use aluminum extrusion for tool stands instead of weldments, well I'm sorry. But hey, if you follow my advice then you'll save yourself a ton of work re-teaching them when they inevitably move around on you.
Hope at least one person out there finds this useful. Cheers!