Dynamic grid with gripper

Hallo UR forum

So, I’m creating a program that has a dynamic grid of cassette that a gripper can pickup from the selection of a user. and give the object to the user in two drop points.
My idea was to create a script for every individual cassette and save these to a database. And then from my own program combine the scripts. For example, we have a base script that sends the robot to his home position. Then a script to pick up an object from the cassette and at last a script to put this object at a drop point.

Would this be the best solution?

Or is there a solution where we can just measure the distance between cassettes and program it this way. So, we don’t need to manually create scripts for 150+ cassettes?

Thank you

I’m currently doing the same thing at the moment but with bearings.

I have multiple bearing sizes in a fixed size tray. So I can get lots of small bearing in a tray and only a few large in a tray (No mixing of sizes in the same tray)

I have One program for all bearing sizes I input the bearing size to the Robot from a HMI and use the known size of the tray to calculate how many parts fit in equal distances inside the tray in Rows & Columns and generate X and Y offsets form the Tray plane origin (in an Array).

is this the kind of thing your looking for?

Creating a Script for 150+ cassettes seems like to much hard work.

Are these cassettes evenly spaced, within reach of robot arm, and oriented the same? If yes, one possible option is to have operator enter 2 numbers before picking operation (a row number & a column number, use an assignment with operator input). You would then create the origin over the 1st part. If parts are equally spaced (say at 50mm) you can just multiply the row/column number by the distance and then update the origin to add whatever translation to shift the waypoint to the pick location, and drop that waypoint into the moveL(). Then you run the grab routine, then the drop routine, and back to the operator input. Not sure the sizes of the cassettes but to avoid having to figure out how wide to open the gripper for picking at each location, I would just open and set the gripper position to it being slightly oversized for the largest cassette.

Anyways hope this helps and best of best!