Palettizing : modify items coordinates

Hello,
I m working on a palettizing solution with the palettizing pattern of UR and i want to ask the operator the height of the boxes and then change automatically all the Z coordinates of items.

Do u think it’s possible ? If yes can u explain me how can i do it ?

Thanks (be kind, i am a rookie programmer)

simondepogny,
Yes its possible! (However not directly within the palletizing template in the polyscope.

The problem is the palletizing template asks for an object height and will only accept a numeric value when what you want is the variable height input by the operator.

so if you want to continue to use the palletizing template you need to change the way you adjust the height.
Firstly ALWAYS use a Plane feature when palettizing (and generally best practice for every thing).

In the Palletizing window select the feature (Plane) you want to use (We’re going to modify it later)
and set the object height to any number
tick the add action after palletizing
Teach the pattern as normal
In the layers window only have 1 layer

now in the action after palletizing you need to modify the Z value of the Plane feature.
select a script node from the advanced options
in the script code box type Plane_1[2] = Plane_1[2]+ Height # I’m assuming your using mm not inches so remember your input will offset the z in Meters!

now every time the palletizing runs it adds the value of height to the z value of the Plane at the end of each layer

if you want to Zero out the Plane back to default
make another script node and type Plane_1 = Plane_1_const.

hope this helps

Thanks a lot for all this details.

The little problem is that i need to have 2 layers because there are 2 differents pattern, one for first level and another for the second.

So, how can i do it with 2 different pattern on the same pallet ? If it’s possible

Thx

simondepogny,
OK now it starts to get a bit more interesting.

What I would do is create a second palletizing template for the second pattern just as you did for the first. (on the bottom level)!

OK so now we have Pattern 2 for odd number layers and Pattern 1 for even number layers.

Your going to have to create a layer counter variable to track what layer your at. (Set it to 0 at the beginning of a new pallet Layer_count = 0)

So when you come to the palletizing part of your program you need to make a choice what palletizing pattern you want to use
the best way is to check for an Odd or Even layer

create an if Node and write Layer_count%2 == 0 this will check if the Layer count is an Odd of Even number
click the add else button
in the first part of the statement put Palletizing Pattern 1
and in the else part of the statement put Palletizing Pattern 2

add into the action after palletizing on both patterns Layer_count = Layer_count+1

Thanks a lot, i will try this today,

If I understand it well, when you teach the robot item coordinates, you have all items’ Z at 0 ?

Yes Exactly
Both patterns need to be taught with the same plane and at the same Z height
then when you offset the plane after each layer both patterns will get offset together.

Remember to make sure when you teach the patterns the plane is back to default!

Thanks for everything, it works almost perfectly.

1 Like