question

Jon_Lee avatar image
0 Likes"
Jon_Lee asked Felix Möhlmann commented

Pack seven same items on conveyor into one

Hi,

Please see the attached model. dzfbsdf.fsm

The layout is as below.

1740034000029.png

The model will send a bunch of long rectangles, the rightmost station will color code them from Type 1 to 7, the centre station will join the 7 items into 1 solid item before sending out to the leftmost station and sink.

The joining I intended is to have the Type 1 reach Centre first, becoming the pallet of sorts. Then rightmost station to release 2 to 7 one by one.


FlexSim 24.2.1
conveyorcombine
1740034000029.png (89.2 KiB)
dzfbsdf.fsm (54.5 KiB)
5 |100000

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

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered Felix Möhlmann commented

You don't need the list. Through the arrival trigger you already have a reference to the next item. You need to store a pointer to the first item though, so the next six tokens can know where to move the item.

Apart from that it's important to wait until items 2-6 have 'continued' on from the station so the restricted area is released. And for this to be possible only the first item should acquire the area between station 2 and 3. Otherwise items 2-6 would be prevented from continuing past station 2.

dzfbsdf_1.fsm


dzfbsdf-1.fsm (51.5 KiB)
· 2
5 |100000

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

Jon_Lee avatar image Jon_Lee commented ·

Hi Felix,


I had placed your above model into Flexsim 23.0.4 instead and now at the leftmost station will display this message whenever the combined object go past.

FlexScript exception: Invalid down cast. Object is not an instance of the target type. at MODEL:/Station3>variables/onContinue


please see attached model. sdvdzsvsdf.fsm


Also, I had changed the centre station's On Continue to On Arrival to have it moving, why can't On Continue work like it did in 24.2?

0 Likes 0 ·
sdvdzsvsdf.fsm (52.3 KiB)
Felix Möhlmann avatar image Felix Möhlmann Jon_Lee commented ·

You didn't add the condition to the Acquire Area option on the middle station that makes only type-1-items acquire the next area.

1740122095249.png

That is both why OnContinue doesn't work (the items can't continue because the area is not available) and why you get an error when the batch arrives at the next station. The next request for the area is by the type-2-item. In the trigger code this item gets cast as a Conveyor.Item class variable. But because the item is not on the conveyor anymore, this is invalid.

0 Likes 0 ·
1740122095249.png (8.6 KiB)