question

Steven N avatar image
0 Likes"
Steven N asked Steven N commented

Queue's to Release after 100% Flow Items Collected, Batch Size is not Fixed

Pkg Rework -No Card_autosave.fsm

The source generates 1 "Cut Schedule" every 40 hours (work week), these cut schedules go to a separator and are distributed into a quantity of Work Orders using pearsont6. As the flow items are exiting this separator they are given a label "WONum". These flow items represent work orders, and are sent to one last separator ("DeviceQtyDist") to be turned into individual "devices", using the logplace distribution.

From here the flow items will go through a tray sealer processor, final inspection queue, final inspection processor and then sent to either of 2 queues, a "Good Device Rack" or a "Rework" queue.

After devices go through the "Good Device" rack they are separated into 1 of 3 queues, and they are separated by the label "WONum".

My question for this model is;

I want to set up the queue's so that they batch the flow items by label "WONum" and will not release the flow items until all the items with the same "WONum" label value have been collected.

Since the flow items are going through 2 separate distributors before reaching the queues, means that the quantity of the flow items can vary from time to time. That is why I cannot set the queue's to have a set value of flow items before sending it to the sink.

Is there a way I can set these queues to collect all flow items of the same label value, despite the quantity changing due to separators?


FlexSim 19.2.4
queuelabelsflexsim 19.2.4batchrework
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

·
Eric M avatar image
0 Likes"
Eric M answered Steven N commented

Hi @Steven N, there's some code that allows you to change the batch size of a queue which I used along with some process flow to accomplish this:

setvarnum(reference to queue,"batchsize",new value);

The process flow works like this. A token is created each time an item leaves the DeviceQtyDist separator. I use a zone to filter out all but the first token. I then calculate the batch size and store it on a label by finding the current output of the separator minus the previous output of the separator. I use a variable to record the previous output. I then wait for the item to enter one of the last queues and then change the batch size to what it should be using the code above. I also updated the Good Device Rack queue to send items according to their WONum to make sure the same items were ending up in the same queue.

One thing I noticed was that occasionally an item of the wrong WONum would slip into the wrong batch. I mostly saw this on really large batches where the part was reworked (maybe even multiple times). To fix this, I added a trigger to the FinalInspectQueue that orders the items according to WONum. This may or may not work for you, but I just wanted to make you aware that there will need to be some logic in place to avoid that issue. Also, I put in a Change Visual that you can delete, I was just using it to check this last issue.

pkg-rework-no-card-em_1.fsm


· 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.

Steven N avatar image Steven N commented ·
Thank you so much @Eric M , this really helped!
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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