question

juan_esteban.sanchez avatar image
2 Likes"
juan_esteban.sanchez asked juan_esteban.sanchez commented

Combining from several ports

I have a Combiner that is receiving items from multiple ports (separators, queues, etc.) I need to combine 20 items, but I don't need a special breakdown. (I don't need to specify how many items should I combine from each port).

FlexSim 16.1.0
combiner
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

Logan Gold avatar image
4 Likes"
Logan Gold answered juan_esteban.sanchez commented

Make it so the multiple upstream objects feed a Queue that in turn feeds the Combiner so the Combiner only has two input ports. Then, set up the Components List in the Combiner tab to accept 20 flowitems from input port 2.


combinerexample.png (172.0 KiB)
· 3
5 |100000

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

juan_esteban.sanchez avatar image juan_esteban.sanchez commented ·

Thanks.... I did it already. But my problem is more visual, because I need to see the items going directly from processors directly to the combiner (no additional steps as the queue)... many times I have items on the queue but I have not the pallet on the combiner at this moment, and the pallet should be the first item to arrive to the combiner...

0 Likes 0 ·
Logan Gold avatar image Logan Gold ♦♦ juan_esteban.sanchez commented ·

Flowitems coming through input port 2 (or higher) of the Combiner will not enter the Combiner until after the container flowitem comes through input port 1. So the pallet (the container in this case) will always be the first item to arrive at the Combiner. However, until the pallet does arrive, flowitems will accumulate in the Queue that is feeding the Combiner.

If you don't like flowitems accumulating at the Queue while waiting for a pallet to arrive, then you can use closeinput() and openinput() on the Queue so it doesn't allow flowitems to enter and accumulate until the Combiner has something come through input port 1. I have attached an example model (combinerexample.fsm) to show how you can do that.

The picklist option set up in the OnReset trigger of the Queue uses closeinput() so the Queue closes its input ports before the model begins any of its runs.

The same picklist option is used in the OnEntry trigger of the Combiner, and it uses openinput() to open the input ports of the Queue once a pallet arrives through input port 1. I was able to use the inobject() command to reference the Queue in the Object field. I also use the variable called port as part of the Condition field so the openinput() command will only be called when a flowitem is coming from input port 1 on the Combiner. Any other flowitems coming through port 2 (or above) will not trigger this code to fire.

Finally, the OnEntry trigger of the Queue will once again close the input ports on the Queue after 20 items have entered the Queue. As soon as the Queue receives 20 flowitems (and immediately sends each one to the Combiner in 0 time), the input ports are closed until the Combiner finishes its current batch of 20 and the next pallet enters.

The Condition field for this OnEntry trigger uses a % symbol (the modulo operation), which simply returns the remainder of two numbers that are divided together. So in this case, we get the input of the Queue and divide it by 20. When the remainder of those two numbers is 0 (20/20, 40/20, 60/20, etc.), the Queue's input ports are closed. Any other number will return a nonzero remainder and the condition will be false.

I've also placed the Queue directly underneath the Combiner so it's not in the way and it looks like the Processors are feeding the Combiner directly. You can also go into that Queue's General tab and clear out the Show 3D Shape checkbox so the Queue doesn't appear at all. However, you won't be able to get to the Queue's properties by clicking in the 3D environment and you'll need to go through the tree to make any changes.

4 Likes 4 ·
combinerexample.fsm (17.9 KiB)
juan_esteban.sanchez avatar image juan_esteban.sanchez commented ·

Thanks for your help...I tried your explanation on my model and works well (without operators) then I used operators on my model and does not work well... Then I used your model with an operator on each Processor to move the boxes from the processor to the Queue and the Queue stills receiving boxes even when it's Input Ports are closed... I used your sample with the operators and some small quantities and timing changes.... look you model with operators... thanks1293-1280-combinerexample-2.fsm

0 Likes 0 ·