<?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: Which case to execute? in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490526#M561908</link>
    <description>&lt;P&gt;I've donw what you have told me but I'm getting this error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"A Case structure must have a case corresponding to every possible value of the selector.&amp;nbsp; An easy way to fill this requirement is to specify a default case or cases whose selector values include ranges to or from infinity."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How should I label the case strcuture?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Will the output array be a 1D array of 2 elements only? 1 corresponding to each case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mhaque&lt;/P&gt;</description>
    <pubDate>Thu, 17 Mar 2011 19:18:36 GMT</pubDate>
    <dc:creator>mhaque</dc:creator>
    <dc:date>2011-03-17T19:18:36Z</dc:date>
    <item>
      <title>Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489004#M561687</link>
      <description>&lt;P&gt;I have a one dimensional array of numbers (integers) that run from 200 to 400.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the numbers fall between 200 to&amp;nbsp;378, I want it to execute a certain case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the numbers are greater than 378 I want it to execute the other case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;simple enough but its late and I'm stumped.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mhaque&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 21:38:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489004#M561687</guid>
      <dc:creator>mhaque</dc:creator>
      <dc:date>2011-03-16T21:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489044#M561694</link>
      <description>&lt;P&gt;See Darren's Weekly Nugget on case structures &lt;A href="http://forums.ni.com/t5/LabVIEW/Darren-s-Weekly-Nugget-03-02-2009/m-p/863132" target="_self" rel="nofollow"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the full list of what I consider required reading see &lt;A href="http://decibel.ni.com/content/docs/DOC-4002" target="_self" rel="nofollow"&gt;this&lt;/A&gt;. Great information.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 22:06:15 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489044#M561694</guid>
      <dc:creator>GovBob</dc:creator>
      <dc:date>2011-03-16T22:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489046#M561695</link>
      <description>&lt;P&gt;Your description is insufficient to give a solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Do you want to test each element individually?&lt;/LI&gt;
&lt;LI&gt;Do you simply want to make sure that all elements are "in range" and execute a different case if &lt;STRONG&gt;at least one element&lt;/STRONG&gt; is outside? ... or if &lt;STRONG&gt;all elements&lt;/STRONG&gt; are outside?&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV&gt;For the second case, wire the array to "in range&amp;amp;coerce" with two scalars as limits and do some logic on the boolean output.&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2011 22:06:17 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489046#M561695</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2011-03-16T22:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489240#M561717</link>
      <description>&lt;P&gt;If i have understood the question&amp;nbsp;properly this is what you are looking in to&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/37986iEA79832BC5384487/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="1.png" title="1.png" align="center" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 03:58:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1489240#M561717</guid>
      <dc:creator>Guruthilak</dc:creator>
      <dc:date>2011-03-17T03:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490412#M561886</link>
      <description>&lt;P&gt;If the number is less than or equal to&amp;nbsp;378 I want it to execute the default case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the number is more than 378 I want it to execute the other case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ans1) Do you mean each element in the array?&lt;/P&gt;
&lt;P&gt;Ans2) No, I want it to excute all the values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for all your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried to explain to the best of my ability please let me know if you need further clarification. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 18:20:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490412#M561886</guid>
      <dc:creator>mhaque</dc:creator>
      <dc:date>2011-03-17T18:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490454#M561891</link>
      <description>&lt;P&gt;you're only looking for the &lt;STRONG&gt;FIRST&lt;/STRONG&gt;&amp;nbsp;true in the array? &amp;nbsp;What about all the others values in the array.&lt;/P&gt;
&lt;P&gt;If you want to check every value in the array, you will have to use somekind of a loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're just looking for an edge (with 378 as level) then you've found the edge.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really want to test every value :&lt;/P&gt;
&lt;P&gt;I would pass the array through a FOR loop and decide which case to execute :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/38112iC701E058CAD125DA/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="WhichCase.png" title="WhichCase.png" align="left" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 18:47:59 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490454#M561891</guid>
      <dc:creator>ABCPrograms</dc:creator>
      <dc:date>2011-03-17T18:47:59Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490464#M561893</link>
      <description>&lt;P&gt;Could you explain further as to why I need some kind of a loop? &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Essentially I want a numeric indicator coming out of the case structure and not an array of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mahir&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 18:51:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490464#M561893</guid>
      <dc:creator>mhaque</dc:creator>
      <dc:date>2011-03-17T18:51:42Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490472#M561895</link>
      <description>&lt;P&gt;ok, you've got an array of values. &amp;nbsp;That is a list of values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Every value in this list can be higher or lower then 378? &amp;nbsp;Not?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, how do you want to decide which value you want to use for the test? &amp;nbsp;The maximum from the array?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 18:55:13 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490472#M561895</guid>
      <dc:creator>ABCPrograms</dc:creator>
      <dc:date>2011-03-17T18:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490526#M561908</link>
      <description>&lt;P&gt;I've donw what you have told me but I'm getting this error&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"A Case structure must have a case corresponding to every possible value of the selector.&amp;nbsp; An easy way to fill this requirement is to specify a default case or cases whose selector values include ranges to or from infinity."&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How should I label the case strcuture?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Will the output array be a 1D array of 2 elements only? 1 corresponding to each case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;mhaque&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 19:18:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490526#M561908</guid>
      <dc:creator>mhaque</dc:creator>
      <dc:date>2011-03-17T19:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Which case to execute?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490534#M561911</link>
      <description>&lt;P&gt;You forgot the default case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Right click on a case and set it as default. (look at attachement)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What my VI will do is, it will test every value in your array and select a case for it and outputs that value. &amp;nbsp;So your output array will have just as many items as your input array.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/38120i4A90E3FBF88C058D/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="untitled.JPG" title="untitled.JPG" align="left" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 17 Mar 2011 19:22:20 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Which-case-to-execute/m-p/1490534#M561911</guid>
      <dc:creator>ABCPrograms</dc:creator>
      <dc:date>2011-03-17T19:22:20Z</dc:date>
    </item>
  </channel>
</rss>

