How to travel to a flow item xyz location

How to travel to a flow item xyz location

marian_c
Not applicable
24 Views
2 Replies
Message 1 of 3

How to travel to a flow item xyz location

marian_c
Not applicable

[ FlexSim 19.0.0 ]

testmodel.fsmHello all,

I have a small simulation of a receiving area where trucks are unloaded. Every pallet is unloaded into queues (buffers) . Using the OnEntry trigger I set labels to each pallet. The most important label is "Stare" which means that after unloading I don't really know what is inside so I have to make a visual inspection of each pallet. After the visual inspection the label "Stare" goes from 0 to either 1 or 2 ---"1 = full pallet, 2 = mixed pallet, 0 = not checked".

Each pallet that enters any buffer is Pushed to a List.

I need to make Operator 1 travel to each pallet and inspect and then set the "Stare" label to 1 or 2 (30 percent 1 and 70 percent 2).

How can I get Operator 1 to go to each pallet xyz position by using TravelToLocation activity ?

Thank you.

Regards,

0 Likes
Accepted solutions (1)
25 Views
2 Replies
Replies (2)
Message 2 of 3

regan_blackett
Autodesk
Autodesk
Accepted solution

You should be able to use the project() method as part of the Object class;

So in your Travel to Loc activity for the X Location you could type (this assumes your pallet is the item and you are using the default item label name from a Create Object activity, substitute the label name as needed):

token.item.as(Object).location.project(token.item.up, model()).x

and then do the same for the Y and Z locations.

Basically this means that we are treating the data in the item label as an Object class, asking for its location property and then projecting it's coordinates (specifically the 'x' coordinate) from the Pallet's container (Buffer) to the Model coordinate space.

Message 3 of 3

logan_gold
Community Manager
Community Manager

@Marian C,

The specific code for your model (in the Travel to Loc activity) would be:

token.pulled.as(Object).location.project(token.pulled.up, token.resource.up).x
token.pulled.as(Object).location.project(token.pulled.up, token.resource.up).y

Since the pallets are being pulled off a list and stored on the pulled label. You'll also want to clear the checkbox called Relative in the Travel to Loc activity, because the above code gives you global coordinates in the model and not coordinates that are relative to the Operator.

0 Likes