Hi all,
I’m building a sorting cell in Visual Components Premium 4.10 and using the Robot Program editor (no Python preferred).
My sorting robot program currently works for one TS part on a pallet (robot not actually gripping the part), but the pallet contains 50 TS total in a 5×10 grid. I want a scalable method so I don’t have to teach and maintain 50 separate pick targets/subprograms. I have attached my project below as well as a picture.
You can define one pick program that uses a base frame for all motion points, and then create a loop with While statement where the base frame is shifted relatively between the pick operations. In this tutorial a robot is programmed in a similar way to place boxes on a pallet in a grid: the same sequence for placing the boxes is used several times by just shifting the base coordinate. Palletizing robot programming | Visual Components Academy
Note that you also need to shift the bases inside the While loops using a SetBase statement.
Here’s the Main of a palletization routine I’ve made previously. It also has the z dimension, but the principle is the same:
-in innermost loop, shift base to X direction
-in the upper-level loop, shift base relatively to Y-direction and to negative X-direction by 5 * pitch_x, so that the base’s x-coordinate doesn’t keep increasing and increasing.
Yes, thank you, I actually managed in the end. Do you know why the base starts at position 2 instead of position 1, and why component 1 is not being included in the first iteration of the loop?
This sequence currently loops through the odd-numbered rows. I also want to implement the same logic for the even-numbered rows. Would you recommend defining a new base in this case for the offset positions