Station to be a specific slot

Station to be a specific slot

nina_a
Not applicable
42 Views
6 Replies
Message 1 of 7

Station to be a specific slot

nina_a
Not applicable

[ FlexSim 20.0.10 ]

Hello everyone, I have an asrs vehicle and two racks ( aisle). In my process flow, I want my asrs to store an item in a specific slot. Both racks are 3X4( 3 bays 4 levels) . My left rack scheme starts from 16 to 27 and my right rack starts from 4 to 15.

In my process flow I want my asrs to unload to a specific slot. I am currently using the storage system and the address scheme is just the slot ID.

In my unload task I used this to the station, but it doesn't seem correct, as it doesn't work.


Object current = param(1);

treenode activity = param(2);

Token token = param(3);

treenode executer = param(4); //Or Task Sequence

treenode processFlow = ownerobject(activity);

Storage.Slot slot = Storage.system.getSlot("4");

return /**/slot.address/**direct*/;

Thank you in advance.

0 Likes
Accepted solutions (1)
43 Views
6 Replies
Replies (6)
Message 2 of 7

moehlmann_fe
Explorer
Explorer
Accepted solution

Using only the slotID as the address is not going to work. The slotIDs are assigned per rack cell (bay & level). If your start slot is set to 4, then the first slot in every cell is going to have an ID of 4. To differentiate between slots in different bays and levels, you have to incorporate those IDs into the address as well.

Alternatively you can not use the addressing scheme at all and instead identify the slots by unique labels that you assign to them.

Furthermore, the Unload activity (as well as other similar activities) expects that you return an object as the station. In order to transport an item to a specific slot, you have to assign the item to that slot (there is an option for this in the Custom Code activity under Control->Warehousing->Assign Slot). Then return the rack that slots belongs to in the Unload activity. You can access the storage object as a property of the slot
capture1.png

0 Likes
Message 3 of 7

nina_a
Not applicable
Thank you so much for your answer it was really helpful.


I also tried to put labels in slots using the Paints slot function. At first this one seemed the most easy to do, as each specific slot will have a specific value. But again my problem was how to accesa them in the station.


0 Likes
Message 4 of 7

moehlmann_fe
Explorer
Explorer
When using labels, you'd first query the storage system for the correct slot, then assign it to the item and as I wrote above, return the storage object of the slot as the station.


Storage.Slot slot = Storage.system.findSlot("WHERE labelName == $1", 0, slotID);
Storage.Item storageItem = Storage.Item(token.item);
storageItem.assignedSlot = slot;
return slot.storageObject;
0 Likes
Message 5 of 7

nina_a
Not applicable

I used the label Position and painted all the slots with that label but with different values.

I suppose my code should be something like this now :


/**Custom Code*/

Object current = param(1);

treenode activity = param(2);

Token token = param(3);

treenode executer = param(4); //Or Task Sequence

treenode processFlow = ownerobject(activity);

Storage.Slot slot = Storage.system.findSlot("WHERE Position == $4.Position",0);

Storage.Item storageItem = Storage.Item(token.TransportedItem1);

storageItem.assignedSlot = slot;

return slot.storageObject;

but still is not working, it seems something I dont get

Thank you again

0 Likes
Message 6 of 7

moehlmann_fe
Explorer
Explorer

The $-syntax allows you to pass parameters into the query. The number behind the $-sign denotes the position at which the parameter appears in the function. In the case of storage queries, the second parameter is a 0 (reserved for flags), the one after that would be swapped in for $1, then $2 and so on.

So assuming you want to pass in the "Position" label on the token, the full line would look like below.

Storage.Slot slot = Storage.system.findSlot("WHERE Position == $1", 0, token.Position);

or

Storage.Slot slot = Storage.system.findSlot("WHERE Position == $1.Position", 0, token);
Message 7 of 7

nina_a
Not applicable
Thank you so much ! now I got it .


It works perfectly fine !

0 Likes