question

Pinakin K avatar image
0 Likes"
Pinakin K asked Joseph Gillespie commented

is it possible to change the travel location, when the AGV is travelling?

I want to change the travel location of the AGV when it is already traveling to a different location.

I'm using process flow for this. The agv would start travel by going to B, but when it passes 1, it should directly go to A, without traveling to B. The attached model does not make that happen.

Thank You!

test.fsm

FlexSim 19.1.1
agvagv network
test.fsm (27.0 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.

1 Answer

·
Joseph Gillespie avatar image
1 Like"
Joseph Gillespie answered
@Pinakin K

You can do this with a little bit of custom code:

Object TaskExecuter = Model.find("TaskExecuter1");
treenode t = createemptytasksequence(TaskExecuter, 0, PREEMPT_AND_ABORT_ACTIVE);
inserttask(t, TASKTYPE_DELAY, NULL, NULL, 0, STATE_IDLE);
dispatchtasksequence(t);

This code will create an empty task sequence (it includes a delay of 0 seconds) that will preempt and abort the previous task sequence (traveling to B). By adding this code after the "Wait for Event" and before directing the AGV to travel to point A, the AGV's destination will be changed when it reaches point 1 so that it travels to point A instead.

Here's your model with this code added in: changedestination.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.

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.