Divert flow items by condition

Divert flow items by condition

praveen_m
Not applicable
508 Views
3 Replies
Message 1 of 4

Divert flow items by condition

praveen_m
Not applicable

[ FlexSim 18.2.3 ]

I want to divert to multiple port based on below conditions attached the model.

Conditions for DP1

1.items direct feed to processor.

2.If the flow items is blocked the items divert items to alternate DP3 or DP4.

3.If the flow is cleared items from rack feed to processor by FIFO basis.

4.flow items should follow FIFO and Batch FIFO.

divert items if conveyor full.fsm

0 Likes
Accepted solutions (1)
509 Views
3 Replies
Replies (3)
Message 2 of 4

jason_lightfoot_adsk
Autodesk
Autodesk
Accepted solution

I would remove what you have and instead put 3 photoeyes on the conveyors as outputs of the single decision point (these are ways of referencing - you're not going to close or open these ports).

1645802824166.png

Then in your decision point I would add a code snippet to the onArrival/Continue (your choice):

Array pes=current.outObjects.toArray();
Object pe;
for (int n=1;n<=pes.length;n++){
    pe=pes;
    if (pe.stats.state().value!=PE_STATE_BLOCKED){
        Conveyor.sendItem(item,pe);
        break;
    }
}

This code scales so you could add more PEs and it will consider them in the order they are connected. If the PE is not blocked it will send the item there.

0 Likes
Message 3 of 4

praveen_m
Not applicable
Thanks for your answer...

In this i the condition 1 & 2 is working but,

In between On clear items are direct feed to processor that needs to be stopped.

can you help me out...

0 Likes
Message 4 of 4

jason_lightfoot_adsk
Autodesk
Autodesk

Here's a start, but not the solution. I've created a seqnum label on the source and two process flows to manage the hold/release of items at the merge point. It stops when the next item in the sequence has not been released in sequence from the racks - something you'll need to consider and address.

divert-items-if-conveyor-full_jl2.fsm

0 Likes