question

Andr%C3%A9 Bongers avatar image
1 Like"
Andr%C3%A9 Bongers asked Regan Blackett edited

Set Location for different Items in a combiner

Hi,

I have a combiner which gets 3 different Items as an Input. I set a "Set Location" Trigger OnEntry but I can only set the location for all Items. Is it possible to set a certain location for each Item?

Furthermore I have another combiner which gets the input from two sources but there are three Items coming from one source (so in Total four Items that get combined). Unfortunatly you only see one Item of the three Items as they are all in the same location. Is it possible to set different locations for each item coming from the same source?

Thanks and best regards,

Andre

FlexSim 16.2.0
combinerset location
5 |100000

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

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

Depending on what combiner mode you are using and how you want it to look, you may end up wanting to write some code in the OnEntry trigger. Luckily the trigger knows what items came from where so you could set up a pattern that says if the combiner gets a part from a particular input, place it at coordinates X, Y, Z.

The code could look something like this:

switch(port)
{
    case 1:setloc(item, 1.5, -.8, 1);break; // items from Port 1 position
    case 2:setloc(item, .9, -.8, 1);break; // items from Port 2 position
    case 3:setloc(item, 1.5, -1.6, 1);break; // items from Port 3 position
    case 4:setloc(item, .9, -1.6, 1);break; // items from Port 4 position
}

Here's an example model: combiner-position-by-incoming-port.fsm


5 |100000

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

Ralf Gruber avatar image
1 Like"
Ralf Gruber answered

Andre,

if you use the combiner in batch mode, everything should happen as expected when choosing the Set Location picklist option OnEntry. It is a little more complicated though, if you use the combiner in pack mode: In this case, the FlowItems entering through ports 2 and higher are immediately moved into the FlowItem that has entered through port 1. THerefore you will have to set the location within that first FlowItem, not within the combiner. Does that make sense?

In the sample model attached, The batch combiner uses the standard Set Location picklist option OnEntry. The pack combiner uses a slight variation, you have to look at the code edit to see that. The first item is positioned according to the standard logic, but all items through ports 2 and higher are positioned based on the logic in the picklist option.

20161006-itemlocationincombiner.fsm


5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered

Do you look for something like that:

The code is OnEntry this line:

setloc(item,(getinput(current)+1)*xsize(item),yloc(item),zloc(item));

Combiner modes are Join and Batch


5 |100000

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

Sam Stubbs avatar image
0 Likes"
Sam Stubbs answered

Rather than put the trigger on the OnEntry trigger, I would put the Set Location logic on an OnExit trigger. IN the OnExit trigger, the items have already been packed, so "item" is now a reference to the container. You can easily reference each item within the container by calling the rank() command. ( rank(object,num) ) Which will return a reference to the item inside the object, at the specified index. (For example, rank(item,3), would return the third item inside your container or pallet.)

I've attached a simple model that uses this method to change the location of the items. As for your second question, I think you'd use this same method to change the location of each item combined, so that they aren't overlapping.

packing.fsm


packing.fsm (22.4 KiB)
5 |100000

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

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.