<?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: Decrementing with -1 in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184056#M106933</link>
    <description>Hello!&lt;BR /&gt;&lt;BR /&gt;Hmm... we created a local variable outside the loop but it is not updated. It updates first when the loop stops... we have a for-loop where we count down as one suggested and then a while-loop outside this for-loop. But the local variable is outside both these loops in the next while-loop and it does not updates at the time when tje first for-loop runs...</description>
    <pubDate>Thu, 17 Feb 2005 08:43:07 GMT</pubDate>
    <dc:creator>Ex-jobb</dc:creator>
    <dc:date>2005-02-17T08:43:07Z</dc:date>
    <item>
      <title>Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/183644#M106718</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;Now we have a smaller problem but our brains seems to have vacation today :P. We want to take a constant and decrement it with 1. For every step we want to decrement the result with one and so on. When we comes to zero we want to start over again from the top. We have been playing with for-loops and the decrementing -1, while-loops and so on... we know this is quite easy for most people &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt; thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 16 Feb 2005 13:06:13 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/183644#M106718</guid>
      <dc:creator>Ex-jobb</dc:creator>
      <dc:date>2005-02-16T13:06:13Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/183652#M106723</link>
      <description>hope this help...&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Neona</description>
      <pubDate>Wed, 16 Feb 2005 13:15:01 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/183652#M106723</guid>
      <dc:creator>neona</dc:creator>
      <dc:date>2005-02-16T13:15:01Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184023#M106912</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;Thank you for your help! We thought of something like that too... we would need the values that comes out from that indicator but outside the loop during the time the loop is running... Is there a way to do this? We tried to do it with a local variable but it did not work so good &lt;span class="lia-unicode-emoji" title=":face_with_tongue:"&gt;😛&lt;/span&gt; any suggestions?</description>
      <pubDate>Thu, 17 Feb 2005 07:24:23 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184023#M106912</guid>
      <dc:creator>Ex-jobb</dc:creator>
      <dc:date>2005-02-17T07:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184031#M106915</link>
      <description>A local variable should work perefctly for a situation like this. The important thing to understand in this matter, is when a node on the block diagram is being read or written to. And the answer: as soon as it's ready and everything before it is complete. As long as both the terminal is being written to (like in Neona's example) and the local variable is being read (the code reading it should keep running), they should be synchronized. If your code stops running, however, then the local won't recieve the updates. You can use Highlight execution (the light-bulb button) to see this nicely.</description>
      <pubDate>Thu, 17 Feb 2005 07:57:37 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184031#M106915</guid>
      <dc:creator>tst</dc:creator>
      <dc:date>2005-02-17T07:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184033#M106916</link>
      <description>Since the loop should always start over after reaching zero, you need a while loop because the total number of iterations is not known at the beginning. (I would recommend against the FOR-inside-WHILE loop in neona's example, because it will prevent you from stopping the VI unless the value reaches zero)&lt;BR /&gt;&lt;BR /&gt;Yes, if you need the current value in another parallel loop, you can use a local variable to do so. I have atttached a small example (LabVIEW 7.0) that shows one possibility.</description>
      <pubDate>Thu, 17 Feb 2005 08:00:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184033#M106916</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2005-02-17T08:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184056#M106933</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;Hmm... we created a local variable outside the loop but it is not updated. It updates first when the loop stops... we have a for-loop where we count down as one suggested and then a while-loop outside this for-loop. But the local variable is outside both these loops in the next while-loop and it does not updates at the time when tje first for-loop runs...</description>
      <pubDate>Thu, 17 Feb 2005 08:43:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184056#M106933</guid>
      <dc:creator>Ex-jobb</dc:creator>
      <dc:date>2005-02-17T08:43:07Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184057#M106934</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;The while-loop we need to use the local variable in is not parallell it is outside the loops the counts... around to say... maybe that is a problem?</description>
      <pubDate>Thu, 17 Feb 2005 08:45:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184057#M106934</guid>
      <dc:creator>Ex-jobb</dc:creator>
      <dc:date>2005-02-17T08:45:45Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184183#M106994</link>
      <description>You need to have the local variable in another parellel while loop, otherwise it would only update once.  If in a parallel while loop, it will keep updating as long as both loops are running in parallel.</description>
      <pubDate>Thu, 17 Feb 2005 15:34:54 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184183#M106994</guid>
      <dc:creator>tbob</dc:creator>
      <dc:date>2005-02-17T15:34:54Z</dc:date>
    </item>
    <item>
      <title>Re: Decrementing with -1</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184490#M107164</link>
      <description>Hello!&lt;BR /&gt;&lt;BR /&gt;Thank you for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Now the problem is solved! Best regards!</description>
      <pubDate>Fri, 18 Feb 2005 08:53:59 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Decrementing-with-1/m-p/184490#M107164</guid>
      <dc:creator>Ex-jobb</dc:creator>
      <dc:date>2005-02-18T08:53:59Z</dc:date>
    </item>
  </channel>
</rss>

