Round Robin if Available from a Conveyor DP

Round Robin if Available from a Conveyor DP

jorge_toucet
Advocate Advocate
458 Views
2 Replies
Message 1 of 3

Round Robin if Available from a Conveyor DP

jorge_toucet
Advocate
Advocate

Hello, if you have a DP on a conveyor and you would like to send to others conveyors DPs based on a round robin if available logic related to the each conveyor content... what is the best way to accomplish it? Me I've an example? Why this rule isn´t a standard option?

For conveyors I was able to code a Round Robin logic and to code a separate First Available one, but not together.

When all the destinations are full, I need to send a First Available but I don't know how to get that destination port number and store it for using it the next time...

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

sam_stubbsYXX86
Alumni
Alumni
Accepted solution

I think I've been able to achieve what you're looking for. So, to answer your question, the reason why "RR if available" is not an option for DPs is because Conveyors are more complicated than your usual port logic. How do you determine if something is Unavailable? With port logic, you just need to check if the port is open, but conveyors send items via conveyor logic, not necessarily through ports. So instead you need another criteria.

So this is what I came up with. I added a "count" label, and a "stopItems" binary label on the DPs. And then I just arbitrarily assigned a count value and some code to some of the DPs checking if the count (or number of items that has passed) reaches a certain point, to set the stopItems label to 1.

Then in the first DP's logic, I just copied the "RR if Available" code from another object, but instead of checking if the Output Ports are open or close, it checks if the stopItems label is 1 or 0. And then it sends the item accordingly.

Here is my example model:

rrifavailableconveyor.fsm

0 Likes
Message 3 of 3

jorge_toucet
Advocate
Advocate

Thank you very much Sam for your help

0 Likes