question

Nivedita Ravi avatar image
0 Likes"
Nivedita Ravi asked Regan Blackett commented

How do I send 1 item from each merging conveyor the merge and repeat again?

I have 4 conveyors merging into 1. How do I make them send 1 item each onto the merge and repeat again? (abcd abcd abcd and so on)

Choose One
conveyorsdecision pointsmerge controllerconveyor transfer
· 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.

1 Answer

Regan Blackett avatar image
1 Like"
Regan Blackett answered Regan Blackett commented

There's probably going to be a few ways to handle this, but I like using Lists for maximum control. So in my example model I have a List that has two sets of tokens interacting with it. The model is found here:

merge-control.fsm

I'm also making some assumptions about how the merge lane wants to receive things, like assuming that you want to keep a strict order of 1, 2, 3, 4 even if something from, say, lane three is ready to release a flowitem when lanes one and two are not; you will always wait for lane one to go first.

One set of tokens represents the Flowitems on the four individual conveyor segments and they are getting Pushed onto a partitioned list using their Type label as a marker for what lane they are on, one through four.

The other token represents the merge lane's availability to Pull a new flowitem onto it.

Tokens representing items are created using an event triggered source when flowitems arrive to decision points on the feeder lanes. The items are then stopped using a 'Stop/Resume item on Conveyor' option from the Custom Code activity. then the tokens are pushed onto the list. When they get pulled, the item will be resumed and will execute a Wait for Event activity that holds the token until flowitem clears one of the gray decision points.

A single puller token is created at the start of the model and will cycle through it's block of activities when the merge lane is "ready" to receive its next flowitem. Right after it's made a Label that I've called PullFromLane will be incremented by 1. When the token first executes this activity it won't have that Label, so it will create it and set it's value to 1. It then executes the Pull from List activity where it looks for items to pull by what lane its in. So if the PullFromLane Label equals 1, it pulls an item from Lane 1, if it equals 2 it pulls from Lane 2 and so on. After the Puller successfully pulls from the list, if the PullFromLane Label is greater than or equal to 4, it is set back to zero otherwise keep its current value. A reference to the pulled item is stored in the pullers item label and is used during the Synchronize activity to make sure that the puller doesn't try to pull from the list again until the item it juist got from the list clears the merge area. The merge area is loosely defined by the gray decision points.

When the item token gets to the Synchronize activity that means it has cleared the merge area, which will release the item token to the sink activity and the Puller token is back to the 'Increment Lane Designation' activity, which allows it attempt to pull from the 'next' lane.


image.png (134.1 KiB)
merge-control.fsm (29.4 KiB)
· 4
5 |100000

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