<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how can i charge my AGV in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530400#M39344</link>
    <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I think that the classic logic doesn' t work because my task executer travel with A* navigation logic and maybe it can influence the classic AGV Process Flow template for charging&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Thu, 08 Oct 2020 16:52:01 GMT</pubDate>
    <dc:creator>francesco_s2</dc:creator>
    <dc:date>2020-10-08T16:52:01Z</dc:date>
    <item>
      <title>how can i charge my AGV</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530396#M39340</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 20.0.1 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;hi everyone,&lt;/P&gt;
 &lt;P&gt;in my warehouse i would like that the task executer goes to battery station when the battery goes down 15 % and than it restarts its task.&lt;/P&gt;
 &lt;P&gt; I show my logic in this picture but the "decide" doesn't work well.&lt;/P&gt;
 &lt;P&gt;this is the model: &lt;A rel="noopener noreferrer" href="https://answers.flexsim.com/storage/attachments/33241-elci-2-alb.fsm" target="_blank"&gt;elci 2 alb.fsm&lt;/A&gt; &lt;/P&gt;
 &lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="33233-immagine4.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1503845iDFE5855C00F434CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="33233-immagine4.png" alt="33233-immagine4.png" /&gt;&lt;/span&gt;&lt;/P&gt;
 &lt;P&gt;can anybody help me?&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Oct 2020 19:00:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530396#M39340</guid>
      <dc:creator>francesco_s2</dc:creator>
      <dc:date>2020-10-07T19:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: how can i charge my AGV</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530397#M39341</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;&lt;A rel="user" href="https://answers.flexsim.com/users/21536/francescos2.html" nodeid="21536"&gt;@FRANCESCO S2&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I don't know if you're aware of this already, but there is an AGV Process Flow template that has the battery/recharging logic built-in. I suggest reviewing that in case it fits your needs. It will save you lots of headaches creating your own logic.&lt;/P&gt;&lt;P&gt;If you're already familiar with the AGV Process Flow template, then let's try and figure out the Decide activity. The Decide activity in the model you uploaded causes the model to crash. I suggest updating the syntax of your AGV reference from this:&lt;/P&gt;&lt;PRE&gt;AGV(token.Pickers).batteryLevel;&lt;/PRE&gt;&lt;P&gt;to this:&lt;/P&gt;&lt;PRE&gt;token.Pickers.as(AGV).batteryLevel;&lt;/PRE&gt;&lt;P&gt;For whatever reason, this accesses the AGV object in the correct way. (I'm not the person to explain this, but I know the syntax is important.) Try accessing your AGV's battery level in this new way I've explained in both your Decide and Custom Code activities and see if it works better.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="33244-1602112147748.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1503837i22122D88EEAFDDD1/image-size/large?v=v2&amp;amp;px=999" role="button" title="33244-1602112147748.png" alt="33244-1602112147748.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hopefully this helps!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Oct 2020 23:09:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530397#M39341</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-10-07T23:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: how can i charge my AGV</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530398#M39342</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;You're also going to want to use the code below for recharging the AGV. I don't think batteryLevel works like most variables and so you can't just tell it to be 100 and have that work. At least, I don't think so. Try using this and then a delay activity (like while your AGV is parked).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="33236-1602112350015.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1503840i444B3A0EE963B600/image-size/large?v=v2&amp;amp;px=999" role="button" title="33236-1602112350015.png" alt="33236-1602112350015.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 07 Oct 2020 23:12:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530398#M39342</guid>
      <dc:creator>tanner_p</dc:creator>
      <dc:date>2020-10-07T23:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: how can i charge my AGV</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530399#M39343</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;thank you, but I try to modify the syntax from:&lt;/P&gt;
 &lt;PRE&gt;AGV(token.Pickers).batteryLevel;&lt;/PRE&gt;
 &lt;P&gt;to:&lt;/P&gt;
 &lt;PRE&gt;AGV(token.Pickers).batteryLevel;&lt;/PRE&gt;
 &lt;P&gt;in "decide" and also in costum code but it doesn't work and give me the same error:&lt;/P&gt;
 &lt;P&gt;time: 50.000000 exception: FlexScript exception: MODEL:/Tools/ProcessFlow/ProcessFlow/Decide~2&amp;gt;variables/decision&lt;/P&gt;
 &lt;P&gt;time: 52.195545 exception: FlexScript exception: MODEL:/Tools/ProcessFlow/ProcessFlow/Custom Code~2&amp;gt;variables/codeNode&lt;/P&gt;
 &lt;P&gt;than I try also to modify the custom code with:&lt;/P&gt;
 &lt;P&gt;AGV(current).startRecharge().&lt;/P&gt;
 &lt;P&gt;but the same i didnt fix the problem.&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Oct 2020 08:35:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530399#M39343</guid>
      <dc:creator>francesco_s2</dc:creator>
      <dc:date>2020-10-08T08:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: how can i charge my AGV</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530400#M39344</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;
 &lt;P&gt;I think that the classic logic doesn' t work because my task executer travel with A* navigation logic and maybe it can influence the classic AGV Process Flow template for charging&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 08 Oct 2020 16:52:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530400#M39344</guid>
      <dc:creator>francesco_s2</dc:creator>
      <dc:date>2020-10-08T16:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: how can i charge my AGV</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530401#M39345</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;In your script window you &lt;STRONG&gt;&lt;EM&gt;can &lt;/EM&gt;&lt;/STRONG&gt;test access to the BatteryLevel using this:&lt;/P&gt;&lt;P&gt;AGV(Model.find("TaskExecuter1")).batteryLevel&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;AGV agv1=AGV(Model.find("TaskExecuter1"));&lt;BR /&gt;return agv1.batteryLevel;&lt;/P&gt;&lt;P&gt;You will see it doesn't work unless the Navigator is set to AGVNetwork, and as you state in your comments you're using A*. One key indicator that it will work is if the quick properties of the task executer show AGV Properties like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="33273-agvquick.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1503843i6822620BA7926DB6/image-size/large?v=v2&amp;amp;px=999" role="button" title="33273-agvquick.png" alt="33273-agvquick.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In your model's case you'll just see this in that area:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="33266-astarquick.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1503844i3DBA7869F2362F47/image-size/large?v=v2&amp;amp;px=999" role="button" title="33266-astarquick.png" alt="33266-astarquick.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Oct 2020 11:11:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/how-can-i-charge-my-agv/m-p/13530401#M39345</guid>
      <dc:creator>jason_lightfoot_adsk</dc:creator>
      <dc:date>2020-10-09T11:11:13Z</dc:date>
    </item>
  </channel>
</rss>

