question

Thalias avatar image
0 Likes"
Thalias asked Matthew Gillespie edited

How to Use a Single Combiner for Multiple Different Combinations

I have 30 queue's, one for each cylinder (each is unique) that I need combined in the following fashion:

#1: Cylinders 1 - 8 combined/joined to make one large cylinder

#2: Cylinders 9-19 combined/joined to make one large cylinder

#3: Cylinders 20-30 combined/joined to make one large cylinder

I'm trying to use a single combiner to do this, but I don't see any options to combine multiple sets of cylinders. I thought of possibly having three combiners, each one tied to one of the cases above, but I can't have them all operating simultaneously since in reality this is all done in one station. In terms of priority, I'd like it to be a simple First Available. In other words, if cylinder 1 is available first, then the combiner starts building that set. When complete, it would switch over to #2 or #3 depending on which one had a cylinder arrive in its queue first.

Hopefully this all makes sense...

FlexSim 17.1.2
combinercombiner component list
· 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.

Jeff Nordgren avatar image Jeff Nordgren commented ·
@Brendon W2

I understand what you are getting at but is it possible to send us your model, even if not working or complete, so that we can see what you are trying to do (and how)? It makes it a lot easier to give you a specific answer and fix your model in the process.

0 Likes 0 ·
Thalias avatar image Thalias Jeff Nordgren commented ·

Jeff,

Unfortunately the model is proprietary but I've mocked up a simplified version of what I'm trying to do. I only attached the first 8 queues to the combiner because I'm unsure of how to "batch" the second and third groups so that the combiner treats them as separate combinations.multi-cylinder-combiner.fsm

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
1 Like"
Joerg Vogel answered Ben Wilson commented

You find in the OnEntry trigger the template "Update Combiner Component List". Unfortunately the decisison is made only from the item entering through the input port number one. If you want to give this approach a try, you can connect the queues 1, 9 and 20 to a single queue. You connect this queue with the combiner to its inport port number 1. Then the item, which enters the Combiner through the port one, defines by its item type which component list will be used. Each list is a column in a global table. If you need more of the items which defines the component list, you have to connect the queues 1,9 and 20 with the combiner additionally, because the combiner joines/combines only one item from the port number one. The global table contains 30 rows for each queue a single row. The cells of the first row contain the values of the amount of items to combine from the queue connected to the input port number 2. The second row contains the amount of items from the queue connected to the input port number 3, and so on. The queues which don't provide items to the combination gets in the global table the value 0.

If you don't want to set the column (component list) by the item type, you have to exchange this by an assignment of your own code.

· 10
5 |100000

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

Thalias avatar image Thalias commented ·

I experimented with a few changes and realized that in the global table, each column corresponds to an incremental item type, regardless of what I name the column. In other words, I can't simply rename three columns 1, 9, and 20. I have to actually make 30 columns and enter the value 0 everywhere except in columns 1, 9, and 20. This seems bizarre, but at least it works. Here is a screenshot of what I mean:

I will respond with the finalize model once I'm done, unless someone can tell me a better approach to the one above.

1 Like 1 ·
multicombine.jpg (93.9 KiB)
Joerg Vogel avatar image Joerg Vogel Thalias commented ·

Perhaps you use a label named recipe at the items and translate the itemtype such that item type 1 is the recipe label value 1, the item type 9 is the recipe label value 2 and the type 20 is the recipe value 3. In the source code you use the value of the label recipe instead of the item type to choose the right column. Then you need only three columns.

0 Likes 0 ·
Thalias avatar image Thalias Joerg Vogel commented ·

Ah I see! That's exactly what I was doing. I've since created a new label and attached the updated model (now with only 3 columns).

multi-cylinder-combiner.fsm

1 Like 1 ·
Thalias avatar image Thalias commented ·

Wouldn't there only need to be 27 rows in the global table since cylinders 1, 9, and 20 are fed through a seperate queue?

0 Likes 0 ·
Thalias avatar image Thalias commented ·

Okay I think I'm almost there but I'm getting the following error when it tries to change to the "9" column:

time: 95.639110 exception: FlexScript exception: Invalid column number: 9 in Global Table "GlobalTable1" at MODEL:/Combiner1>variables/entrytrigger

I'm not sure why it says "9" is not a valid column number. This corresponds to the ItemType that I set at the source. Model attached for reference. multi-cylinder-combiner.fsm

0 Likes 0 ·
Jeff Nordgren avatar image Jeff Nordgren commented ·

The main problem I see with this solution is it doesn't address the part where Brendon says: "In other words, if cylinder 1 is available first, then the combiner starts building that set. When complete, it would switch over to #2 or #3 depending on which one had a cylinder arrive in its queue first."

I understand that to mean whatever of the queues get a flowitem in it first, is the first batch (1 from each of the queues in the batch) to be processed. And the next batch could start from any of the 30 queues that has the longest waiting flowitem. @Brendon W2, is this correct?

0 Likes 0 ·
Thalias avatar image Thalias Jeff Nordgren commented ·

Great question! I had to think about it for a moment but actually cylinders 1, 9, and 20 are the drivers for which set to start building. The reason for this is because they are the first cylinders required to kick off the process. Even if the first set has a cylinder with the longest queue, as long as 9 or 20 get there before 1, those sets would have the priority.

This being the case I believe Jorg's solution will work, but I cannot figure out why I'm getting this error when it tries to switch sets:

time: 95.639110 exception: FlexScript exception: Invalid column number: 9 in Global Table "GlobalTable1" at MODEL:/Combiner1>variables/entrytrigger

See the model I attached to an earlier message for more detail (note that I haven't connected any of the queues past 9 yet because I'm still trying to figure out this error message).

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel Thalias commented ·

You will have only 3 columns. For each starting item entering the combiner through the port number one. If the item of 9th queue enters the combiner through the port number one, the column is the second. The item of 20th queue initiating the combining the column is 3rd.

0 Likes 0 ·
Thalias avatar image Thalias commented ·

@Jörg Vogel, do you know of a simple way to make the combiner pull in the same order as the ports?

In other words, if cylinder 3 is ready before cylinder 2, it will wait for 2 to be complete before starting 3.

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ Thalias commented ·

Hi @Thalias,

As this question already has an accepted answer, it would be better to ask this new question as a totally new question, especially since it can stand on its own.

Please see the community best practices.

You'll get a lot more attention from our support staff and community by posting a brand new question than you will by appending a small comment way below an accepted answer.

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.