question

Jennifer F avatar image
1 Like"
Jennifer F asked Arun Kr commented

How do i change the speed of AGV using flexscript?

Hello!

I'm new to flexsim. I need to change the speed of the AGV using flexscript. Could anybody help with that?

FlexSim 19.2.4
flexscriptflexsim 19.2.4agv speed
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

Arun Kr avatar image
2 Likes"
Arun Kr answered Arun Kr commented

Hi @Jennifer F,

When you use the AGV Module

You can use the sampler to get the reference of the AGV speed parameters from the AGV network properties and then use that reference to change the speed. For Eg:

int SpeedValue = 5;

Model.find("AGVNetwork>variables/agvTypes/DefaultAGV/speeds/Straight/Empty")

ForwardSpeed.value = SpeedValue;

You may use this code in the process flow or in your waypoint logic in the model.

When you don't use AGV Module

int SpeedValue = 5;

treenode ForwardSpeed = getvarnode(Model.find("TaskExecuter1"), "maxspeed")

ForwardSpeed.value = SpeedValue;

You may use this code in the process flow or in the triggers in your model

Regards,

Arun KR



· 4
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.