question

kimsh avatar image
0 Likes"
kimsh asked Jeanette F commented

Setting Multiple Outport Input Conditions

From the source conveyor, item type 1 goes to the conveyor connected to the sink, and the rest goes to one of the 2, 3, 4 rails...!

Here I want to go one step further.
As shown in the picture below, one of the rails 2, 3, and 4 is full and often does not receive items from the source conveyor. (For example, lines 3 and 4 are empty, but lines 2 are often full and cannot enter the entire line.)

So I want to put lines 2, 3 and 4 evenly so that they don't get stuck in certain places. If each line has more than a few items, I want to create a trigger to go to another line. (or photoye block trigger etc...)


ExitTransfer4

exittransfer4-send-to-port-code.png


need limit condition.fsmlimit-condition.png

FlexSim 23.2.2
setting multiple outport input conditions
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @kimsh, was Jason Lightfoot's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Felix Möhlmann commented

If you want to follow a strict pattern to send them evenly then you can use the output of the conveyor minus the number sent to the sink and the function fmod() to determine the port:

if (item.Type == 1){
   current.port1qty++;
   return 1;
}
int numOut=current.stats.output.value-current.port1qty;
int port=Math.fmod(numOut,3)+1;
return port;

For this I've added a label to the exit transfer called port1qty which is set to zero on reset.


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

kimsh avatar image kimsh commented ·

Um... That's a good idea. I don't put the lines 2, 3 and 4 in order. Items should be evenly included in all lines 2, 3, and 4. If items are evenly included in each line and a certain line is blocked, we should make sure to supply them to other lines.

0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann kimsh commented ·

You could read the content of the connected conveyors and choose the one with the least items on it as the output direction.

need-limit-condition-fm.fsm

The downside to this method is that items in transit are not counted towards the content. So using a counter label might be a better option.

Also, if the conveyors have different length, it would be better to determine the available capacity per conveyor and choose the one with the highest value.

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.