<?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: For loops in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65967#M40802</link>
    <description>hmm.. Ok I got that part workning now.. The problem seems to be that even if&lt;BR /&gt;i clear the indicators of there contents at startup the program seems to&lt;BR /&gt;remeber all values from the last run. So for each time i run the program it&lt;BR /&gt;accumulates the same data over and over like this.&lt;BR /&gt;&lt;BR /&gt;string indicator s1=1,2,3,4,5&lt;BR /&gt;&lt;BR /&gt;next run i get s1=1,2,3,4,5,1,2,3,4,5&lt;BR /&gt;&lt;BR /&gt;and next s1=1,2,3,4,5,1,2,3,4,5,1,2,3,4,5 and so on.&lt;BR /&gt;&lt;BR /&gt;Seems that labview is not that easy afterall C++ is easier &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;BTG Anders olme &lt;BR /&gt;</description>
    <pubDate>Sun, 17 Nov 2002 14:36:07 GMT</pubDate>
    <dc:creator>Anders Olme</dc:creator>
    <dc:date>2002-11-17T14:36:07Z</dc:date>
    <item>
      <title>For loops</title>
      <link>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65964#M40799</link>
      <description>Hello.&lt;BR /&gt;&lt;BR /&gt;I have a problem with a for loop. I have donloaded a html file from a&lt;BR /&gt;server which I intend to parse. But first I have to translate some of&lt;BR /&gt;the charaters in the file from html notation to normal charatcers ( e&lt;BR /&gt;g from Å style to åäö). My problem is that the subsequent VI get&lt;BR /&gt;one text for each turn in the loop ( so i get 6 copies of my html file&lt;BR /&gt;fed into my parser). How do prevent all but the last iteration to&lt;BR /&gt;reach the other VIs? I would like somethin like this:&lt;BR /&gt;&lt;BR /&gt;arr=[1,2,3,4,5,6,7,8];&lt;BR /&gt;&lt;BR /&gt;for i = 0 to 7&lt;BR /&gt;begin&lt;BR /&gt;  arr[i]= arr[i]+1&lt;BR /&gt;end&lt;BR /&gt;&lt;BR /&gt;(* now do something else with my data *)&lt;BR /&gt;&lt;BR /&gt;BRG Anders Olme &lt;BR /&gt;</description>
      <pubDate>Sun, 17 Nov 2002 09:06:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65964#M40799</guid>
      <dc:creator>Anders Olme</dc:creator>
      <dc:date>2002-11-17T09:06:03Z</dc:date>
    </item>
    <item>
      <title>Re: For loops</title>
      <link>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65965#M40800</link>
      <description>If the Input array size is N then only run the For Loop N-1 times.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"Anders Olme" &lt;A_OLME&gt; wrote in message&lt;BR /&gt;news:e9be8caa.0211170036.63f8c4e3@posting.google.com...&lt;BR /&gt;&amp;gt; Hello.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; I have a problem with a for loop. I have donloaded a html file from a&lt;BR /&gt;&amp;gt; server which I intend to parse. But first I have to translate some of&lt;BR /&gt;&amp;gt; the charaters in the file from html notation to normal charatcers ( e&lt;BR /&gt;&amp;gt; g from Å style to åäö). My problem is that the subsequent VI get&lt;BR /&gt;&amp;gt; one text for each turn in the loop ( so i get 6 copies of my html file&lt;BR /&gt;&amp;gt; fed into my parser). How do prevent all but the last iteration to&lt;BR /&gt;&amp;gt; reach the other VIs? I would like somethin like this:&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; arr=[1,2,3,4,5,6,7,8];&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; for i = 0 to 7&lt;BR /&gt;&amp;gt; begin&lt;BR /&gt;&amp;gt;   arr[i]= arr[i]+1&lt;BR /&gt;&amp;gt; end&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; (* now do somethin&lt;BR /&gt;g else with my data *)&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; BRG Anders Olme &lt;BR /&gt;&lt;/A_OLME&gt;</description>
      <pubDate>Sun, 17 Nov 2002 14:06:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65965#M40800</guid>
      <dc:creator>TommyB</dc:creator>
      <dc:date>2002-11-17T14:06:08Z</dc:date>
    </item>
    <item>
      <title>Re: For loops</title>
      <link>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65966#M40801</link>
      <description>&amp;gt; I have a problem with a for loop. I have donloaded a html file from a&lt;BR /&gt;&amp;gt; server which I intend to parse. But first I have to translate some of&lt;BR /&gt;&amp;gt; the charaters in the file from html notation to normal charatcers ( e&lt;BR /&gt;&amp;gt; g from Å style to åäö). My problem is that the subsequent VI get&lt;BR /&gt;&amp;gt; one text for each turn in the loop ( so i get 6 copies of my html file&lt;BR /&gt;&amp;gt; fed into my parser). How do prevent all but the last iteration to&lt;BR /&gt;&amp;gt; reach the other VIs? I would like somethin like this:&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; arr=[1,2,3,4,5,6,7,8];&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; for i = 0 to 7&lt;BR /&gt;&amp;gt; begin&lt;BR /&gt;&amp;gt;   arr[i]= arr[i]+1&lt;BR /&gt;&amp;gt; end&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&amp;gt; (* now do something else with my data *)&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&lt;BR /&gt;Forgive me if I'm restating the basics, but the problem sounds like &lt;BR /&gt;there is code in the for loop that you don't want to be there.  The For &lt;BR /&gt;loop is a r&lt;BR /&gt;ectangle, with an interior and an exterior.  The textual for &lt;BR /&gt;loop you wrote above uses the begin and end key words to indicate its &lt;BR /&gt;interior and exterior.  If you place the (* now...) code between the &lt;BR /&gt;begin/end, it is "inside the for loop".  With LV, code inside the &lt;BR /&gt;rectangle is inside the for loop.  So grab it and drag it outside. &lt;BR /&gt;Then, if it is supposed to have data flowing between it and the for &lt;BR /&gt;loop, wire it up.&lt;BR /&gt;&lt;BR /&gt;If this is indeed the cause of your problem, you should probably visit &lt;BR /&gt;the manuals to make sure you don't miss auto-indexing and shift &lt;BR /&gt;registers as they are powerful, but sometimes confusing loop concepts in LV.&lt;BR /&gt;&lt;BR /&gt;Greg McKaskle &lt;BR /&gt;</description>
      <pubDate>Sun, 17 Nov 2002 14:36:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65966#M40801</guid>
      <dc:creator>Greg_McKaskle2</dc:creator>
      <dc:date>2002-11-17T14:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: For loops</title>
      <link>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65967#M40802</link>
      <description>hmm.. Ok I got that part workning now.. The problem seems to be that even if&lt;BR /&gt;i clear the indicators of there contents at startup the program seems to&lt;BR /&gt;remeber all values from the last run. So for each time i run the program it&lt;BR /&gt;accumulates the same data over and over like this.&lt;BR /&gt;&lt;BR /&gt;string indicator s1=1,2,3,4,5&lt;BR /&gt;&lt;BR /&gt;next run i get s1=1,2,3,4,5,1,2,3,4,5&lt;BR /&gt;&lt;BR /&gt;and next s1=1,2,3,4,5,1,2,3,4,5,1,2,3,4,5 and so on.&lt;BR /&gt;&lt;BR /&gt;Seems that labview is not that easy afterall C++ is easier &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;BTG Anders olme &lt;BR /&gt;</description>
      <pubDate>Sun, 17 Nov 2002 14:36:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65967#M40802</guid>
      <dc:creator>Anders Olme</dc:creator>
      <dc:date>2002-11-17T14:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: For loops</title>
      <link>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65968#M40803</link>
      <description>You need to learn LabVIEW before you make a statement like that.  You aren't&lt;BR /&gt;initializing your shift register before running the loop.  That's why you&lt;BR /&gt;keep getting the last iteration in the next run.  Initialization is just as&lt;BR /&gt;important in LabVIEW as in any other language.  Even C++!!!&lt;BR /&gt;-Tom&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;"Anders Olme" &lt;A_OLME&gt; wrote in message&lt;BR /&gt;news:ar89d3$fs99c$1@ID-48779.news.dfncis.de...&lt;BR /&gt;&amp;gt; hmm.. Ok I got that part workning now.. The problem seems to be that even&lt;BR /&gt;if&lt;BR /&gt;&amp;gt; i clear the indicators of there contents at startup the program seems to&lt;BR /&gt;&amp;gt; remeber all values from the last run. So for each time i run the program&lt;BR /&gt;it&lt;BR /&gt;&amp;gt; accumulates the same data over and over like this.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; string indicator s1=1,2,3,4,5&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; next run i get s1=1,2,3,4,5,1,2,3,4,5&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; &lt;BR /&gt;and next s1=1,2,3,4,5,1,2,3,4,5,1,2,3,4,5 and so on.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; Seems that labview is not that easy afterall C++ is easier &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; BTG Anders olme&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&lt;/A_OLME&gt;</description>
      <pubDate>Sun, 17 Nov 2002 16:36:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/For-loops/m-p/65968#M40803</guid>
      <dc:creator>TommyB</dc:creator>
      <dc:date>2002-11-17T16:36:05Z</dc:date>
    </item>
  </channel>
</rss>

