How to get the agv state information using custom code ?

How to get the agv state information using custom code ?

athodupunoori
Participant Participant
24 Views
1 Reply
Message 1 of 2

How to get the agv state information using custom code ?

athodupunoori
Participant
Participant

[ FlexSim 21.1.5 ]

Hi,


I used process flow to determine the operation of an AGV such as travel, load, unload. I would like to know what is the state of an AGV using custom code so that i can decide where my token needs to go next.


1677021244298.png

For example as seen in the attached image, the selected AGV is blocked. i would like to check that using the custom code in decide function.

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

jason_lightfootVL7B4
Autodesk
Autodesk
Accepted solution

If you agvs are members of an object process flow then the state can be found using:

current.stats.state().valueString   //returns eg.  "idle"

or

current.stats.state().value   //returns eg.  1  or STATE_IDLE

Otherwise substitute current with a pointer to your agv object - eg token.agv