Announcements
Autodesk Community will be read-only between April 26 and April 27 as we complete essential maintenance. We will remove this banner once completed. Thanks for your understanding
Announcements
We are currently migrating data within this board to improve the community. During this process, posting, replying, editing and other features are temporarily disabled. We sincerely apologize for any inconvenience caused and appreciate your understanding. Thank you for your patience and support.

Travel A Truck from Control point 1 to 2 by flexScript

mehdi_k2
Not applicable
0 Views
5 Replies
Message 1 of 6

Travel A Truck from Control point 1 to 2 by flexScript

mehdi_k2
Not applicable

[ FlexSim 19.0.0 ]

Hi,

I have a model with a path and control point. I strongly need just a Piece of code ( Not Process Flow Block) that helps me to Travel a Truck (or AGV) from control point 1 to control point 2.

please see the attached model. I need to Travel the Truck from Cp1 to Cp2 by "Command".

Thanks,

depot (3).fsm

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

joerg_vogel
Not applicable
Accepted solution

TaskSequence create method: there is an example code.

Instead of TASKTYPE_LOAD, item, current you use

TASKTYPE_TRAVEL, obj Cp2, NULL

Where “obj Cp2” is a pointer to Cp2

Reply
Reply
Message 3 of 6

mehdi_k2
Not applicable

thanks,

But It's not Worked for me!

Reply
Reply
0 Likes
Message 4 of 6

joerg_vogel
Not applicable
treenode ControlP = Model.find("CP2");
TaskSequence ts =TaskSequence.create(token.Train,0,0);
ts.addTask(TASKTYPE_TRAVEL,ControlP,NULL);
ts.dispatch();

Sure it does work! But only for the first TE, any other TE need an allocateable Control Point ahead.

Reply
Reply
Message 5 of 6

mehdi_k2
Not applicable

thanks @Jörg Vogel for Response,

Now my problem is :

How can I make sure that the next code is activated after the truck arrives at its destination?

Reply
Reply
0 Likes
Message 6 of 6

jeanette_fullmer88DK3
Autodesk
Autodesk

Hello @Mehdi K2

The next truck cannot travel to a CP that is occupied. Here is a small example that shows when the truck in front leaves the following truck starts moving.

depot-3_1.fsm

Reply
Reply