question

Praveen M avatar image
0 Likes"
Praveen M asked Jason Lightfoot commented

Divert flow items by condition

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

FlexSim 18.2.3
FlexSim 18.0.10
photo eyedecisionpoint
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

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

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[n];
    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.


1645802824166.png (225.6 KiB)
· 2
5 |100000

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

Praveen M avatar image Praveen M commented ·
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 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦ Praveen M commented ·

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