Copy container labels to packed items after separator

Copy container labels to packed items after separator

amit_k2
Not applicable
27 Views
19 Replies
Message 1 of 20

Copy container labels to packed items after separator

amit_k2
Not applicable

[ FlexSim 20.2.3 ]

In attached model, two pallets go through a combiner and are packed onto another pallet. The contained pallet of the combined pallet is then assigned a slot in the rack system. How do I correctly copy these labels to the packed pallets if they have to go through a separator as shown in the system, so that the individual pallets after the separator go to the location assigned to their container pallet?

Container_Label_to_Packed_Item.fsm

0 Likes
Accepted solutions (1)
28 Views
19 Replies
Replies (19)
Message 2 of 20

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

You could put this in the processFinish trigger of the seperator if you alway know there are two pallets in the packed pallet.

createcopy(item.attrs["labels"],item.first.as(Object).attrs["labels"],1,0,0,1);
createcopy(item.attrs["labels"],item.last.as(Object).attrs["labels"],1,0,0,1);


0 Likes
Message 3 of 20

amit_k2
Not applicable
Do I remove the subflow after adding this trigger?
0 Likes
Message 4 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

Yes - or use that subflow with the logic above and don't put it on the trigger.

0 Likes
Message 5 of 20

amit_k2
Not applicable

Okay, I removed the subflow and put the logic on the separator's processFinish trigger. Separated pallets now have the slot and rack that the container pallet was assigned. So far so good. Now when moving these separated pallets to the rack, how do I currectly reference them? I used current as shown below, but it triggers exceptions.34995-1607445802597.png

What am I doing wrong and which part of the manual do I refer to have a better understanding of referencing for situations like this?

Many thanks for the help!

0 Likes
Message 6 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

Can you share the model ? Your descriptio doesn't match what you were doing in the last model where you assigned a slot to the inventoryPallet that contained the two pallets you're talking about.

0 Likes
Message 7 of 20

amit_k2
Not applicable

I'm sorry, I forgot to attach the model. Here it is.

Container_Label_Create_Copy_V_1.fsm

0 Likes
Message 8 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

Have you assigned them to the slot? If so you can just move them to the rack - they're in the array of Pallets labelled on your token.

But actually you've probably assigned the inventory Pallet which you're now not sending to the rack (right?) - so that will need unassigning. Not about the impact of unassigning an item that isn't yet in the rack - you'd have to try it.

0 Likes
Message 9 of 20

amit_k2
Not applicable

Yes, I assigned the inventory pallet a slot, which goes through a process before the rack, packed pallets are unpacked and then stored in the slot.

How do I unassign the slot of the inventory pallet? Do I do that in the same processFinish trigger, or in the process flow?

0 Likes
Message 10 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

Apparently you set the assignSlot to NULL - I put a link describing this in the last reply.

0 Likes
Message 11 of 20

amit_k2
Not applicable

Something similar to described in option 2 of the following from the manual? Container_Label_Create_Copy_V_2.fsm

Storage.Item.currentSlot

readonly Storage.Slot currentSlot

Description

The item's current slot.

The item's current slot is the slot that the item is currently stored in. You cannot directly set the item's current slot. Instead, you can do one of the following:

  • Directly set the item's assignedSlot and then move the flow item (either immediately or through some transit process) into that slot's storage object. Here when the item is moved into the storage object, the assigned slot will be recognized and its assigned slot will become its current slot.
  • Leave the assignedSlot property unassigned, and just move the flow item into a storage object. When the storage object receives the item, it will recognized that the item has no assigned slot, and will fire its slot assignment strategy, which should assign the slot. Then the item's assigned slot will become its current slot.
0 Likes
Message 12 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

No - it's the 5th option in the link I gave about the assignedSlot attribute as I stated. It states:

  • Directly set assignedSlot to NULL. This will put the item in an outbound state. Item searches using Storage.system.findItem() will skip over outbound items by default.
0 Likes
Message 13 of 20

amit_k2
Not applicable

Understood. Attached is the updated model. Can you take a look at it when you get a chance?

Container_Label_Create_Copy_V3.fsm

0 Likes
Message 14 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

Can you describe what you're seeing that is wrong at this stage? What have you now tried that isn't working or you don't understand?

0 Likes
Message 15 of 20

amit_k2
Not applicable

It is working the way it is supposed to. Just wanted to make sure that it has been implemented correctly. Thank you for being patient with me.

0 Likes
Message 16 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

I can't say as I don't have all the requirements. I thought you wanted pairs of items of the same type stored side by side in a bay in two adjacent slots. You seemed to move away from that with this model as it doesn't do that, and with previous versions where you put them together on a single pallet. If you understand both the model and requirements and think they match then that's a good start. Is that the case?

0 Likes
Message 17 of 20

amit_k2
Not applicable

Ideally, I would want them to be sent to the same adjacent locations after separation, and I had not noticed that they were being sent to different locations.

After close observation, the pallets have same destination till they reach Queue4 , but after that, they are sent to same painted slots, but in different racks if the query is

WHERE slot.storageObject.Active=1 AND Type IS $1.Type ORDER BY RAND()


So, I tried adjusting it to

WHERE slot.storageObject.Active=1 AND Type IS $1.Type  ORDER BY Type IS $1.Type DESC, slot.hasSpace($1.InventoryPallet) DESC

which results in exception of no slot assigned to the item. What is causing the issue here?

I am still trying to wrap my head around querying the storage system correctly.


0 Likes
Message 18 of 20

jason_lightfootVL7B4
Autodesk
Autodesk

I feel inclined to say send us the requirements and process description and we can review what you're doing or need to do for the whole project - I feel I have as much of a grasp of that side of things as you probably feel you have with FlexSim's Storage System.

0 Likes
Message 19 of 20

joerg_vogel_HsH
Mentor
Mentor

You use clause “IS” where you should use “=“. You have problems with writing a SQL clause in FlexSim rather than with Storage System at all.

And it is absolutely impossible to help, as long as we don’t know what assigned $1 to.

0 Likes
Message 20 of 20

Ben_WilsonADSK
Community Manager
Community Manager

Hi @Amit Kulkarni, was jason.lightfoot's answer helpful? If so, please click the red "Accept" button on their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes