Set Location for different Items in a combiner

Set Location for different Items in a combiner

andra_bongers
Not applicable
35 Views
4 Replies
Message 1 of 5

Set Location for different Items in a combiner

andra_bongers
Not applicable

[ FlexSim 16.2.0 ]

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

Accepted solutions (1)
36 Views
4 Replies
Replies (4)
Message 2 of 5

ralf_gruber
Collaborator
Collaborator

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

Message 3 of 5

sam_stubbsYXX86
Community Manager
Community Manager

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

0 Likes
Message 4 of 5

regan_blackett
Autodesk
Autodesk
Accepted solution

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

Message 5 of 5

joerg_vogel_HsH
Mentor
Mentor

Do you look for something like that:

2872-setloc-onentry-combiner.gif

The code is OnEntry this line:

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

Combiner modes are Join and Batch

0 Likes