<?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: Create specific array based on variable test cases in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3819203#M1079110</link>
    <description>&lt;P&gt;Here's what I was talking about in my previous message.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jul 2018 03:40:22 GMT</pubDate>
    <dc:creator>RavensFan</dc:creator>
    <dc:date>2018-07-20T03:40:22Z</dc:date>
    <item>
      <title>Create specific array based on variable test cases</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3817898#M1078630</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am extracting data from a very large excel spreadsheet.&amp;nbsp; Each row of the spreadsheet contains various amounts of test conditions in each cell of that specific row.&amp;nbsp; I have included a simplified version, where the different test condition has been separated out in each state of the state machine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IN the attached case, there are 3 conditions for Test 1, 2 conditions for Test 2, 0 conditions for Test 3 and then 2 conditions for Test 4.&amp;nbsp; We must end up with an array that is 3 x 2 x 2 (12) rows. I would like to generate an array such that we vary the last column with different test conditions while keeping the left test conditions fixed.&amp;nbsp; After the last column test conditions are done, we then change the test condition in the adjacent left column...Test case 3 (in this case it will be Test case 2 as there are no conditions in Test case 3).&amp;nbsp; These iterations will be repeated until we end up with the array as shown in the table below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-07-17_11-35-21.png" style="width: 253px;"&gt;&lt;img src="https://ip1.i.lithium.com/82b673dfbb3e47b18b0517754096bb93797245a9/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32333137363869374344313046414141334236384645312f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="2018-07-17_11-35-21.png" alt="2018-07-17_11-35-21.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;hiNi&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 16:50:43 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3817898#M1078630</guid>
      <dc:creator>hiNI</dc:creator>
      <dc:date>2018-07-17T16:50:43Z</dc:date>
    </item>
    <item>
      <title>Re: Create specific array based on variable test cases</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3817930#M1078648</link>
      <description>&lt;P&gt;Use nested For Loops.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Example_VI" style="width: 706px;"&gt;&lt;img src="https://ip1.i.lithium.com/a0a59f14de5c26c30c306520ce515fd61fcd19c4/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32333137373769463141374243463241444430344145442f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Example_VI" alt="Example_VI" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 17:56:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3817930#M1078648</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2018-07-17T17:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Create specific array based on variable test cases</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3817978#M1078668</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your response.&amp;nbsp; I implemented your suggestion into the updated program.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, if an extra test is added I will have to modify the&amp;nbsp;for loops.&amp;nbsp; Is it possible to make the program more dynamic so that a for loop will not have to be added each time a new test array is added?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Jul 2018 19:26:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3817978#M1078668</guid>
      <dc:creator>hiNI</dc:creator>
      <dc:date>2018-07-17T19:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create specific array based on variable test cases</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3818422#M1078823</link>
      <description>&lt;P&gt;Can this be made into another state machine format where as the number of tests are changed, the for loops can be changed accordingly?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is what the for loop looks like...it may increase!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2018-07-18_11-10-05.png" style="width: 999px;"&gt;&lt;img src="https://ip1.i.lithium.com/f6d2b70837640dbc37ec8f24a49e99e5e4f5a4b8/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32333138333469463244324234454539384143423632342f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="2018-07-18_11-10-05.png" alt="2018-07-18_11-10-05.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 15:11:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3818422#M1078823</guid>
      <dc:creator>hiNI</dc:creator>
      <dc:date>2018-07-18T15:11:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create specific array based on variable test cases</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3818434#M1078826</link>
      <description>&lt;P&gt;Here is a tip for you.&amp;nbsp; All those constants you have wired into the Index Arrays .....&amp;nbsp; you don't need them.&amp;nbsp; You automatically get 0, 1, 2, 3, .....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For a programmatic way to build the combinations where the number of tests is variable, I'd work with what you had going on in message 3.&amp;nbsp; With the following changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.&amp;nbsp; Don't hard code a statemachine with test 1, test 2, test 3, test 4 .....&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; Create an array where each element is the number of variations for each test.&amp;nbsp; So a 1-D array of 3, 4, 1, 2&amp;nbsp; means 4 different tests with 3 variations of 1, 4, of 2, 1 of test 3,&amp;nbsp; 2 of test 4.&amp;nbsp; Now if you want a 5th test, you add another element.&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; For the names of each test, create an array like you have in each "test X" case.&amp;nbsp; Build it into a cluster.&amp;nbsp; Build each cluster in an array.&amp;nbsp; Each element of that array represents one of the tests.&amp;nbsp; The cluster holds the array that gives the name for each variation of that test.&amp;nbsp; You basically want a 2-D array of strings, but because arrays can't be ragged, (i.e. you can't have row 1 be 3 elements and row 2 be 5 elements), the cluster gives you a way to work around that.&lt;/P&gt;
&lt;P&gt;4.&amp;nbsp; Work out the logic in pseudo code for how to iterate with a single while loop.&amp;nbsp; Keep a shift register with the current index for each test.&amp;nbsp; Add 1 for test N test.&amp;nbsp; When you get to the last variation for that test, reset it back to one and increment the index for the for the test N-1.&amp;nbsp; When N-1 reaches the end, reset that back to 1 and increment test N-2.&amp;nbsp; When test #1 reaches the end, end the while loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 15:25:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3818434#M1078826</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2018-07-18T15:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create specific array based on variable test cases</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3818483#M1078848</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your suggestion.&amp;nbsp; I have placed the tests in a cluster as per your recommendation (I left the case structures for now).&amp;nbsp; I am getting stuck in generating the array now for the tests.&amp;nbsp; Can you offer some more guidance as to how to generate the&amp;nbsp;array list as shown in the original question?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jul 2018 16:32:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3818483#M1078848</guid>
      <dc:creator>hiNI</dc:creator>
      <dc:date>2018-07-18T16:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: Create specific array based on variable test cases</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3819203#M1079110</link>
      <description>&lt;P&gt;Here's what I was talking about in my previous message.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 03:40:22 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Create-specific-array-based-on-variable-test-cases/m-p/3819203#M1079110</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2018-07-20T03:40:22Z</dc:date>
    </item>
  </channel>
</rss>

