Not Able To Detach Trailer After AGV Custom Travel Activity

arunTTT2P
Observer Observer
0 Views
4 Replies
Message 1 of 5

Not Able To Detach Trailer After AGV Custom Travel Activity

arunTTT2P
Observer
Observer

[ FlexSim 20.1.3 ]

Hi Support,

I am not able to detach the trailer from the driver after the agv custom travel before the driver goes back to the home location using the normal travel activity.

31183-1595422411517.png

Also attaching the sample model for reference. agv1.fsm

Regards,

Arun KR

0 Likes
Accepted solutions (1)
1 View
4 Replies
Replies (4)
Message 2 of 5

joerg_vogel
Not applicable
Accepted solution

After you have detached a trailer, you must move the object into another container like the model.

following custom code activity source code.

treenode item = token.item;
Object itemObj = item;
treenode traveler = Model.find("TaskExecuter1");
Object travelerObj = traveler;
Vec3 curLoc =itemObj.location.project(traveler,model())
transfernode(item,model());
itemObj.location = curLoc;
Message 3 of 5

joerg_vogel
Not applicable

attached modified file:

agv1_AK_JV.fsm


0 Likes
Message 4 of 5

arunTTT2P
Observer
Observer

Thanks for the quick reply and it's working.

But if we have the item first placed on the model, then perform an attach followed by a detach. The item will be placed on the new location as per the trailer's offset position. How is the item transfer taking place in this case, without using the above-mentioned custom code? Is this a bug? Pls, see the attached model.

agv1.fsm

Regards,

Arun KR


0 Likes
Message 5 of 5

joerg_vogel
Not applicable

It is more a matter of the container for the item. In your second example the attached item stays as a subnode at the control point 3. While you inserts the item inside a taskexecuter, the items stays as a subnode at the taskexecuter. The detach method has got parts included which keeps the current location in model and project it to the current container. If you want to check the behavior yourself, look into the tree where the item is a subnode of.

Type a product name