<?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 Time Plot from Global Table - data.rowNum only works for first time in FlexSim Forum</title>
    <link>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575547#M74859</link>
    <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.1.3 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I am trying to make a time plot to show me daily production totals on multiple processors. I have all the data in a Global Table, and it gets zeroed out after the plot happens each day.&lt;/P&gt;&lt;P&gt;After much painful trial and error, I have figured out how to use a Statistics Collector with a timed event, which reads all the rows I want from the table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103152388.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519329i1899F9D4C8B4E54F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103152388.png" alt="1694103152388.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I got the names of the processors from data.rowValue&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103318102.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519330iFD4615420064AEBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103318102.png" alt="1694103318102.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;and the row numbers for the other columns from data.rowNum:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103454669.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519331i12AF1F155C057172/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103454669.png" alt="1694103454669.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It worked perfectly for the first plot, &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694104342534.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519332i696D31D324977E95/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694104342534.png" alt="1694104342534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and succesfully added new rows for the second plot (something which I have been struggling to achieve!) BUT the data.rowNum is the Statistics Collector row number and no longer matches the Global Table row number. (e.g. plot 1 reads rows 1 thru 24, and plot 2 is trying to read rows 25 thru 48.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694104444665.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519333iB93E4C9E6AAAAACB/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694104444665.png" alt="1694104444665.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So then I tried to create a data label with an array of row numbers, which works....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103822619.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519334i4EC446B92204938B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103822619.png" alt="1694103822619.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I put that into my row number field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103933825.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519335iD883834B86E30DD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103933825.png" alt="1694103933825.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but it doesn't work.&lt;/P&gt;&lt;P&gt;I have been looking for a standard variable to use as an index for the array "data.testLabel", but I can't find one. What is the syntax for this? Or is there some other little trick I am missing?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;(I can't post the model because it's confidential, but I can send it to someone in the support team if it would help.)&lt;/P&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 07 Sep 2023 16:37:44 GMT</pubDate>
    <dc:creator>clairekruppGhafari</dc:creator>
    <dc:date>2023-09-07T16:37:44Z</dc:date>
    <item>
      <title>Time Plot from Global Table - data.rowNum only works for first time</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575547#M74859</link>
      <description>&lt;P&gt;&lt;I&gt;[ FlexSim 23.1.3 ]&lt;/I&gt;&lt;/P&gt;&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;I am trying to make a time plot to show me daily production totals on multiple processors. I have all the data in a Global Table, and it gets zeroed out after the plot happens each day.&lt;/P&gt;&lt;P&gt;After much painful trial and error, I have figured out how to use a Statistics Collector with a timed event, which reads all the rows I want from the table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103152388.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519329i1899F9D4C8B4E54F/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103152388.png" alt="1694103152388.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then I got the names of the processors from data.rowValue&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103318102.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519330iFD4615420064AEBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103318102.png" alt="1694103318102.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;and the row numbers for the other columns from data.rowNum:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103454669.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519331i12AF1F155C057172/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103454669.png" alt="1694103454669.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;It worked perfectly for the first plot, &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694104342534.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519332i696D31D324977E95/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694104342534.png" alt="1694104342534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and succesfully added new rows for the second plot (something which I have been struggling to achieve!) BUT the data.rowNum is the Statistics Collector row number and no longer matches the Global Table row number. (e.g. plot 1 reads rows 1 thru 24, and plot 2 is trying to read rows 25 thru 48.)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694104444665.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519333iB93E4C9E6AAAAACB/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694104444665.png" alt="1694104444665.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So then I tried to create a data label with an array of row numbers, which works....&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103822619.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519334i4EC446B92204938B/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103822619.png" alt="1694103822619.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And I put that into my row number field:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1694103933825.png"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1519335iD883834B86E30DD2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1694103933825.png" alt="1694103933825.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but it doesn't work.&lt;/P&gt;&lt;P&gt;I have been looking for a standard variable to use as an index for the array "data.testLabel", but I can't find one. What is the syntax for this? Or is there some other little trick I am missing?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;(I can't post the model because it's confidential, but I can send it to someone in the support team if it would help.)&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Sep 2023 16:37:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575547#M74859</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2023-09-07T16:37:44Z</dc:date>
    </item>
    <item>
      <title>Re: Time Plot from Global Table - data.rowNum only works for first time</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575548#M74860</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;If the number of rows is fixed, you can translate the statistics collector's row number into the global table row number with the modulo operator % (returns the rest of a whole number division).&lt;/P&gt;&lt;PRE&gt;int globalRow = (data.rowNum - 1)%24 + 1;&lt;/PRE&gt;&lt;P&gt;The -1 and +1 are needed so 48, 72, ... correctly map to 24.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Sep 2023 06:18:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575548#M74860</guid>
      <dc:creator>moehlmann_fe</dc:creator>
      <dc:date>2023-09-08T06:18:37Z</dc:date>
    </item>
    <item>
      <title>Re: Time Plot from Global Table - data.rowNum only works for first time</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575549#M74861</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;Thanks &lt;A rel="user" href="https://answers.flexsim.com/users/19365/felixmh.html" nodeid="19365"&gt;@Felix Möhlmann&lt;/A&gt; that' s a nice compact solution. &lt;P&gt;&lt;BR /&gt;&lt;/P&gt;I did find a way to use a Label on the collector itself and update it with a Trigger "On Row Added", but I think I like yours better!&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 08 Sep 2023 20:47:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575549#M74861</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2023-09-08T20:47:03Z</dc:date>
    </item>
    <item>
      <title>Re: Time Plot from Global Table - data.rowNum only works for first time</title>
      <link>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575550#M74862</link>
      <description>&lt;DIV class="fr-view clearfix"&gt;&lt;P&gt;To anyone wanting to use this method, DO NOT use "data.testLabel" - you don't need it.&lt;/P&gt;&lt;P&gt;Just put Felix's expression &lt;SPAN id="isPasted" style="color: rgb(102, 102, 0); font-family: Menlo, Monaco, Consolas, "&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "&gt;data&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0); font-family: Menlo, Monaco, Consolas, "&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "&gt;rowNum &lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0); font-family: Menlo, Monaco, Consolas, "&gt;-&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 102, 102); font-family: Menlo, Monaco, Consolas, "&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0); font-family: Menlo, Monaco, Consolas, "&gt;)%&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 102, 102); font-family: Menlo, Monaco, Consolas, "&gt;24&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 0); font-family: Menlo, Monaco, Consolas, "&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "&gt; &lt;/SPAN&gt;&lt;SPAN style="color: rgb(0, 102, 102); font-family: Menlo, Monaco, Consolas, "&gt;1    &lt;/SPAN&gt;directly into the "Row" field.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 14 Sep 2023 20:35:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/flexsim-forum/time-plot-from-global-table-data-rownum-only-works-for-first/m-p/13575550#M74862</guid>
      <dc:creator>clairekruppGhafari</dc:creator>
      <dc:date>2023-09-14T20:35:30Z</dc:date>
    </item>
  </channel>
</rss>

