Pick position updating based on product dimensions + how to control offsets?

Setup
I have a simple test setup with:

  1. Feeder outputting 3 products with different dimensions.
  2. Robot picking the product from one conveyor and placing on another.
  3. Robot has a simple recorded routine for picking and placing (T1_PICK, T1_PLACE)

Goal
I want to understand how I could control the pick offset based on the incoming product.

Since the robot routine was recorded with product 1500 x 1000, the Pick frame is saved exactly at x=750, y=500 mm in the routine.

As far as I can tell, each time a product arrives at From Conveyor #2, it updates the Base, which is called From Conveyor Process #2 to the corner of the product.

This works for this particular product, however, if a smaller product needs to be picked, Pick(750,500,0) won’t be at the center of it. For example:

  1. Product 1 arrives (1500 x 1000), and Pick is not in the center any more.
  2. Product 2 arrives (1000 x 500).

So what should happen is that in this case the Base would be offset by (-250, -250, 0). Then Pick would again be in the middle of the product.

And since each next product can have different sizes, the offset somehow needs to be tied to either the product dimensions or 2 properties in each product (offsetX, offsetY).

Question

  • How would it be possible to apply this offset based on either the arrived product’s dimensions or parameters?
  • Something is moving the Base frame as the product arrives at the process node. What is it and can it be modified to apply these offsets?

I already looked into adding a pick frame in each product component, but that only seems to work if robot motion is ‘Automatic’ and not with custom routines.

Thanks!

What is the way to realise more complex robot logic like this in Visual Components? Is there a way to open up the generic robot controller and modify the scripts in there (for example in this case to apply some offsets to the wobjs before each movement)?

I know there’s a way to connect VC to an ABB virtual controller and I think adding these sorts of offsets would be quite easy in RAPID. But what’s the way of doing this in VC?

Found a working solution through my own testing, because I found that the robot controller logic can be pretty easily modified.

  1. Add a vector product property for each product and define x,y,z offsets.
  2. In the robot transport controller, change the execute_custom_routine function to read the product offsets and translate the target matrices accordingly.

This way different offsets can easily be applied per product,and per _PICK and _PLACE routines.

Still wondering why there isn’t an easier way to do this in VC - this seems like a workaround.