Beginner Question so go easy please.
We have purchased a UR3e and are looking to pick and place 100 small items from 1 jig to another. The pattern of the 2 jigs is different, please see attached. Position 1 to 100 are set for both jigs. I know I can program this manually but there must be an easier way. Any help would be appreciated please.
have you looked in templates there should be a palletizing program that can palletize and depalletize parts . i dont know if your jig layout will work easily but it could be worth a try.
You can look into palletizing as @jsiegenfeldta suggest, or else you can teach the first point to a Feature, then just programmatically shift this Feature to re-use the same taught point.
You trade tediousness of manually teaching 100 points for a little math.
While you can definitely do it all with 1 point, seeing as how you’re new, I would start by considering the jig as 2 sets of rows. One which starts aligned right, another which steps in a hole. Teach your whole jig to a Feature using the corners, that way you can skew the jig and still be fine. Next teach all your moves to place a part in slot 1 to this Feature.
Let’s say the X axis is left and right, and Y is up and down. The program could look something like this:
With this, make sure to add a Script node at the top, set it to File, and add this function definition:
def shiftRelativeToFeature(x_offset, y_offset, z_offset, feature, poseToShift):
return pose_trans(feature, pose_add(pose_trans(pose_inv(feature), poseToShift), p[x_offset, y_offset, z_offset,0,0,0]))
end
You would then Copy/Paste this whole double-loop structure for the second row point. Or feel free to modify this to use just 1 point. You can use the % operator to tell if you’re in an Even/Odd row and offset accordingly. But this can get your feet wet with understanding how Features work and how you can shift them around to make your life easier.
I think easiest approach is that you use the Palletizing template, use the grid template.
Set the grid with double nr of elements per row, and then increase +1 (additionally) everytime an object is picked. See diagram below, with element nr and how the grid is set:
those pallet variables are slightly confusing but this is a good approach for sure. you could also just teach 2 pallets of 5x10 and either go through the first full pallet and then come back through the second, or just teach them in an if statement based on a variable being true or false.