question

Chitra J avatar image
0 Likes"
Chitra J asked Chitra J commented

how to know destination rack level for loaded part on forklift?

I want to know on which level of rack forklift is going to unload item when it loads it from queqe.

I can check the level once part is loaded by forklift in tree as below image, but I want to set the level number as forklift's label as integer.

how to assign loaded part's destination rack level number as forklift label on load trigger?

1646204038605.png

Forklift_unload_level_check_model.fsm

FlexSim 22.0.0
rackforkliftlevel
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 Chitra J commented

The necessary properties/methods are available through the Storage.Item and Storage.Slot classes.

https://docs.flexsim.com/en/22.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storage.Item.html

https://docs.flexsim.com/en/22.0/Reference/CodingInFlexSim/FlexScriptAPIReference/Warehousing/Storage.Slot.html

  1. /**Custom Code*/
  2. TaskExecuter current = ownerobject(c);
  3. Object item = param(1);
  4. Object station = param(2);
  5.  
  6. Storage.Item storageItem = Storage.Item(item); // Get Storage.Item class object
  7. Storage.Slot slot = storageItem.assignedSlot; // Get Storage.Slot from Storage.Item
  8. current.destLevel = slot.levelID; // Get Level from Storage.Slot
  9.  
  10. // All in one row
  11. current.destLevel = Storage.Item(item).as(Storage.Item).assignedSlot.levelID;
· 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.