question

Piotr R avatar image
0 Likes"
Piotr R asked Joerg Vogel commented

How to change packing method so the object is centered ?

Hi Everyone,

I would like to have my "steel profiles" in the middle of the pallet ?

I tried to used "Set Location" in "On Exit " Trigger but it only moves my pallet not the flow item.

I saw that similar questions have been solved by some custom codes but I have no idea how it works.

What's the easiest way to solve it ?

Thanks in advance ;) You Guys are doing incredible job helping Us !

Model 2.fsm

FlexSim 21.1.3
flexsim 21.1.3packing methodsequence of operationscentered
1622730373702.png (278.7 KiB)
model-2.fsm (63.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Joerg Vogel avatar image Joerg Vogel commented ·

. . .

0 Likes 0 ·

1 Answer

·
Eric M avatar image
1 Like"
Eric M answered Piotr R commented

Hi @Piotr R, another way to do it would be with process flow. I create a token when the steel bar leaves the conveyor and then use a "change visual" activity to center the bar.

You'll notice there's still some FlexScript code. I assigned the tokens a label called "item" when they are created (this references the item that caused the event to fire, so the steel bar). "token.item" then is saying to set the location of the steel bar. I changed the x location to make it centered on the pallet by some simple math based on the size of the bar / pallet. Because I only wanted to change the x location and didn't want to mess up the normal stacking sequence of the bars in the pallet, I tell it to not change the location by inputting its current location as the new location. The "location.y" is just finding the y-position of the bar, so inputting it into the new location keeps it constant.

model-2-em.fsm


1622758089599.png (10.4 KiB)
model-2-em.fsm (66.7 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Piotr R avatar image Piotr R commented ·

Thanks Eric !

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.