How can I make rack send goods with a specific label (for example: the color is orange) at a specific time without using processflow
How can I make rack send goods with a specific label (for example: the color is orange) at a specific time without using processflow
You could configure the On Message trigger to release items of a given type up to a specified quantity.
Object current = ownerobject(c); Object fromObject = param(1); Variant msgparam1 = param(2); Variant msgparam2 = param(3); Variant msgparam3 = param(4); int type = msgparam1; int qty = msgparam2; // Search for items in rack Array Items = Storage.system.queryItems("WHERE Type == $1 AND item.slot.storageObject == $2", 0, type, current); // Release found items up to specified quantity for(int i = 1; i <= Math.min(Items.length, qty); i++) { Object item = Items[i].as(Storage.Slot.Item).item; releaseitem(item, 1); }
If the release is timed, the respective message could be send by a user event (Toolbox -> Modeling Logic)
Writing this logic into the On Message trigger makes it easily accessible from anywhere in the model through the "sendmessage()" command. If the release is only triggered at a single place, you can also place the code there directly (just make sure to assign the correct rack to "current") and forego the use of the trigger.
You can also put the same code on a label of the rack with an appropriate 'functional' name and invoke that 'user method' label with the evaluate() method, passing in the two parameters.
rack.labels["releaseNofType"].evaluate(<type>, <quantity>);
Or you can create a user command where you pass in the rack, type and quantity (least preferred technique).
The basic principle, certainly. But the queue is not part of the storage system, so you need to query for available items in a different way.
The attached model demonstrates a general approach that would also work for the rack, if you want to unify the logic.
The queue pushes all entering items to a global list in the "Send to Port" option. The list has a "Type" field that mirrors the value of the Type label and is partitioned by the object that pushed the item to the list (so you only need a single list for multiple objects).
The OnMessage code then pulls items with matching type from the correct partition, up to the specified quantity. If there are not enough items on the list to reach the quantity, the rest is ignored.
Object current = ownerobject(c); Object fromObject = param(1); Variant msgparam1 = param(2); Variant msgparam2 = param(3); Variant msgparam3 = param(4); int type = msgparam1; int qty = msgparam2; // Pull matching items from list string pullQuery = "WHERE Type == " + string.fromNum(type, 0); Variant pulledItems = List("ItemList").pull(pullQuery, qty, 0, current, current); // Release pulled items for(int i = 1; i <= pulledItems.length; i++) { releaseitem(pulledItems[i], 1); }
I want to know where my settings are wrong, all the items on the rack are taken in one execution
Is there a mistake in setting the ID?
I would like to know how to set up if there are more than two output?
14 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved