How to set the palletizing ability to a box flow item?

How to set the palletizing ability to a box flow item?

joerg_vogel_HsH
Mentor Mentor
22 Views
3 Replies
Message 1 of 4

How to set the palletizing ability to a box flow item?

joerg_vogel_HsH
Mentor
Mentor

[ FlexSim 17.2.3 ]

I want to add a packing method to a flowitem. The Flowitem is the result of a joining process in a combiner. I have copied the behaviour node of a pallet flowitem from the flowitem bin, but an added other flowitem isn't stacked correctly as it would happen with a pallet flowitem. What should I do to get the same behaviour in a box flowitem as the pallet flowitem does?

Object current = param(1);treenode activity = param(2);
Token token = param(3);
treenode processFlow = ownerobject(activity);
Object item = token.item;
Object binPallet = model().find("Tools/FlowItemBin/Pallet/Pallet");
treenode palletBehave = binPallet.find(">behaviour/eventfunctions");
treenode itemBehave = item.attrs.assert("behaviour");
createcopy(palletBehave,itemBehave,1);
itemBehave.rank = 2;
rebindobjectattributes(item.attrs.behaviour);

Custom source code in Process Flow activity

9916-set-palletizing-ability-to-box-item.jpg

Picture of the model - the pallet in Queue1 doesn't stack the flowitem as the pallet from Queue2.

0 Likes
Accepted solutions (1)
23 Views
3 Replies
Replies (3)
Message 2 of 4

arunTTT2P
Explorer
Explorer
Accepted solution

Hi @Jörg Vogel,

Instead of changing the behavior of the box to pallet on the combiner, you can release pallets from source 1 & 2 with the 3d shape of box with proper size by using the exit triggers of the sources. Then after changing the visual using process flow, packing will happen normally.

On top of that, you can avoid the custom code in the process flow. I think.combiner-model.fsm

Regards,

Arun KR

Message 3 of 4

joerg_vogel_HsH
Mentor
Mentor

If I do the same in the Flowitem Bin, before I start a model run, the copied behaviour works. Is it a problem how the flexsim engine interpret the source code when the model is translated into machine code. I am copying source code to an item after the translation process had been finished.

0 Likes
Message 4 of 4

joerg_vogel_HsH
Mentor
Mentor
@Arun KR

your answer seems the easiest method to get the stacking method to an box item. I have tested the command copyattibutes( ). But this command doesn't copy the behaviour node to the box neither. Thanks!