<?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: Why doesn't the port open/closed as specified in the code? in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537862#M45321</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@phil.bobo&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Is there a way to refer to the items in the other processor without referencing the value when it was created? Does current.centerobjects[1] works this way? If so, could I use the exact centerobjects[1] for processor 3 and 4 in the same way?&lt;/P&gt;</description>
    <pubDate>Wed, 26 Feb 2020 18:55:25 GMT</pubDate>
    <dc:creator>jianyuan_halley_l</dc:creator>
    <dc:date>2020-02-26T18:55:25Z</dc:date>
    <item>
      <title>Why doesn't the port open/closed as specified in the code?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537858#M45317</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I'm trying to open/close port when the value recorded in the global table exceeds a certain amount but even though there is no error message when running, the port doesn't seem to open/close.&lt;/P&gt;
&lt;P&gt;In the model below, both processor 1 and 2 adds a number to Table("GlobalTable1")[1][1] when there's an item being processed. If the number hits 5, the input port should close and only opens when the number drops below 5. &lt;/P&gt;
&lt;P&gt;However when running, I've observed that Table("GlobalTable1")[1][1] goes up to 20 when it should not be able to go above 5. I suspect it has to do with the maximum content of both processor being 10 and therefore adds up to 20 but since the input port should be closed I'm not sure how items are still being sent.&lt;/P&gt;
&lt;P&gt;Thanks for taking your time to read!&lt;/P&gt;
&lt;P&gt;&lt;A id="25952" href="https://answers.flexsim.com/storage/attachments/25952-test-9.fsm"&gt;test-9.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 15:47:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537858#M45317</guid>
      <dc:creator>jianyuan_halley_l</dc:creator>
      <dc:date>2020-02-26T15:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the port open/closed as specified in the code?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537859#M45318</link>
      <description>&lt;P&gt;Your code is trying to close and open the input of the global table.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="25955-involved.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1501378i81688C6BECEF2191/image-size/large?v=v2&amp;amp;px=999" role="button" title="25955-involved.png" alt="25955-involved.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you want to close the input of the processor, then you need to specify the processor as the involved object.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 16:21:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537859#M45318</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2020-02-26T16:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the port open/closed as specified in the code?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537860#M45319</link>
      <description>&lt;P&gt;Hello &lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@phil.bobo&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;I've made the changes but it seems like now processor 1&amp;amp;2 could only process 6 items before being "Stuck" (meanwhile, the value at global table shows 0). The only change I've made was to specify the object as current. Do you know what's wrong with changing that?&lt;/P&gt;
&lt;P&gt;Object involved = /** \nObject: */ /***tag:object*//**/&lt;STRONG&gt;current&lt;/STRONG&gt;/**/;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;U&gt;&lt;/U&gt;&lt;SUB&gt;&lt;/SUB&gt;&lt;SUP&gt;&lt;/SUP&gt;&lt;DEL&gt;&lt;/DEL&gt;&lt;A id="25963" href="https://answers.flexsim.com/storage/attachments/25963-test-9.fsm"&gt;test-9.fsm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 17:44:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537860#M45319</guid>
      <dc:creator>jianyuan_halley_l</dc:creator>
      <dc:date>2020-02-26T17:44:34Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the port open/closed as specified in the code?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537861#M45320</link>
      <description>&lt;P&gt;That's what your logic is doing. You aren't closing the input until something enters.&lt;/P&gt;&lt;P&gt;So when the fifth item enters one of the processors, you are only closing that one processor and the other processor is still available to receive another item. Once it receives the next item, it closes itself so that it doesn't receive another after that one.&lt;/P&gt;&lt;P&gt;Change your logic to close and reopen both processors at the same time instead of individually.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 18:24:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537861#M45320</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2020-02-26T18:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the port open/closed as specified in the code?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537862#M45321</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@phil.bobo&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Is there a way to refer to the items in the other processor without referencing the value when it was created? Does current.centerobjects[1] works this way? If so, could I use the exact centerobjects[1] for processor 3 and 4 in the same way?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 18:55:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537862#M45321</guid>
      <dc:creator>jianyuan_halley_l</dc:creator>
      <dc:date>2020-02-26T18:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the port open/closed as specified in the code?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537863#M45322</link>
      <description>&lt;P&gt;Yes, you can reference the other objects and the items in the other processor.&lt;/P&gt;&lt;P&gt;Yes, you can use current.centerObjects[1] to reference the other processor in your model.&lt;/P&gt;&lt;P&gt;Yes, you can do that same thing with processor 3 and 4.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 19:03:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537863#M45322</guid>
      <dc:creator>philboboADSK</dc:creator>
      <dc:date>2020-02-26T19:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Why doesn't the port open/closed as specified in the code?</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537864#M45323</link>
      <description>&lt;P&gt;Thank you for your help &lt;A rel="user" href="https://answers.flexsim.com/users/206/phil.b.html" nodeid="206"&gt;@phil.bobo&lt;/A&gt;!! &lt;/P&gt;</description>
      <pubDate>Wed, 26 Feb 2020 19:13:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/why-doesn-t-the-port-open-closed-as-specified-in-the-code/m-p/13537864#M45323</guid>
      <dc:creator>jianyuan_halley_l</dc:creator>
      <dc:date>2020-02-26T19:13:37Z</dc:date>
    </item>
  </channel>
</rss>

