question

Leo A2 avatar image
0 Likes"
Leo A2 asked Leo A2 commented

Get AGV Orientation

Hello,

How do you get the orientation of an AGV travelling via code? I would like to implement logic that is dependent on AGV orientation (forward vs backward)

FlexSim 21.1.5
agvcustom code
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Leo A2 commented

Here's a model with a user command "isAGVinReverse".

Note that in future versions of FlexSim, if the structure of the AGV changes, this may need changing or may not be supported. If you'd like this feature added as as standard agv property then you can suggest it as an idea here on the forum or mail your request to FlexSim.

isAGVinReverse.fsm



isagvinreverse.fsm (32.3 KiB)
· 5
5 |100000

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

Leo A2 avatar image Leo A2 commented ·
Thank you!
0 Likes 0 ·
Leo A2 avatar image Leo A2 commented ·

Hi, I did some testing and seems like this solution does not work if the AGV changes direction before it reaches the destination. Attached the model to show what I mean.

isagvinreverse_issue.fsm

0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Leo A2 commented ·
Thanks for pointing that out - I'll fix it shortly.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Leo A2 commented ·
0 Likes 0 ·
Leo A2 avatar image Leo A2 Jason Lightfoot ♦♦ commented ·
Thank you!!
0 Likes 0 ·