<?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: Using a Local Variable on a button that has its mechanical actions set to latch when released in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35849#M23398</link>
    <description>mikeporter wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Attached is a vi providing a more general solution to the problem.&lt;BR /&gt;&amp;gt; It's helpful when you have seperate processes that you need to be able&lt;BR /&gt;&lt;BR /&gt;##### cut..&lt;BR /&gt;&lt;BR /&gt;Hi Mike, hi Terry,&lt;BR /&gt;thats the way I handle it to. Maybes its helpful to put timing into the loop to prevent high cpu-usage. Second,&lt;BR /&gt;multible instances of this vi only work in this wanted way, because if theyre proberties are set to&lt;BR /&gt;nonreentrant. That means, the use the same memory space.&lt;BR /&gt;&lt;BR /&gt;Lately I have written a vi with 2 instances of pid- controllers, which behaved very strangely. That was the&lt;BR /&gt;point where I stumbled over the reentrant stuff.&lt;BR /&gt;Because nonreentrant is default, and I never knew anything about reentrance before I just used my VIs...&lt;BR /&gt;Well the strangeness was, that the PID &lt;BR /&gt;VIs were accessed alternating and the internal results (shift registers)&lt;BR /&gt;of the previous used other PID-VI, were then used by the current accessed PID-VI. So there was no independance&lt;BR /&gt;between both PID instances, because the SHARED THE SAME MEMORY. If one is not aware of this circumstance, this&lt;BR /&gt;can be very confusing while debugging a VI. You see values changing of the strange behaving VI, and you don't&lt;BR /&gt;know why...&lt;BR /&gt;&lt;BR /&gt;Thats it so far,&lt;BR /&gt;&lt;BR /&gt;Rainer &lt;BR /&gt;</description>
    <pubDate>Tue, 26 Feb 2002 10:07:32 GMT</pubDate>
    <dc:creator>Rainer Ehrt</dc:creator>
    <dc:date>2002-02-26T10:07:32Z</dc:date>
    <item>
      <title>Using a Local Variable on a button that has its mechanical actions set to latch when released</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35846#M23395</link>
      <description>I have two loops running in parallel. In one loop I am controlling a VCR and in the other loop I am monitoring some environmental conditions.  In my VCR Control I have buttons on the panel that operate the various functions and are setup as "Latch when released". In my monitoring loop I would like to activate the Rec and Stop buttons when certain conditions are meet. However when I create a local variable to these buttons an error occurs because of the latch.  Is there a way to activate these without changing to a different latch. &lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2002 16:28:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35846#M23395</guid>
      <dc:creator>Terry_S</dc:creator>
      <dc:date>2002-02-14T16:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Local Variable on a button that has its mechanical actions set to latch when released</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35847#M23396</link>
      <description>Terry,&lt;BR /&gt;&lt;BR /&gt;I would suggest adding a (hidden) button for each, and using the appropriate action.  Either that, or change the action on your buttons, and have the values reset (to mimic a latch when released) after the action is taken.  This is done by resetting the value with a local after the appropriate action has been taken.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Michael Du'Lyea&lt;BR /&gt;&lt;A href="http://www.quiq.com"&gt;Advanced Test Engineering&lt;/A&gt; &lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2002 19:10:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35847#M23396</guid>
      <dc:creator>Labviewguru</dc:creator>
      <dc:date>2002-02-14T19:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Local Variable on a button that has its mechanical actions set to latch when released</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35848#M23397</link>
      <description>Attached is a vi providing a more general solution to the problem. It's helpful when you have seperate processes that you need to be able to stop. To use this subVI, place it in each loop you wish to terminate. Wire the loop's "local stop" control to the "Continue?" input and the loop's run node to the "Keep Application Running" output.&lt;BR /&gt;&lt;BR /&gt;Alsp put an instance in your initialization code somewhere with the "Initialization" input wired to a TRUE constant.&lt;BR /&gt;&lt;BR /&gt;Now whenever any loop trips a stop, everybody stops...&lt;BR /&gt;&lt;BR /&gt;Mike... &lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2002 20:04:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35848#M23397</guid>
      <dc:creator>mikeporter</dc:creator>
      <dc:date>2002-02-14T20:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Local Variable on a button that has its mechanical actions set to latch when released</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35849#M23398</link>
      <description>mikeporter wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Attached is a vi providing a more general solution to the problem.&lt;BR /&gt;&amp;gt; It's helpful when you have seperate processes that you need to be able&lt;BR /&gt;&lt;BR /&gt;##### cut..&lt;BR /&gt;&lt;BR /&gt;Hi Mike, hi Terry,&lt;BR /&gt;thats the way I handle it to. Maybes its helpful to put timing into the loop to prevent high cpu-usage. Second,&lt;BR /&gt;multible instances of this vi only work in this wanted way, because if theyre proberties are set to&lt;BR /&gt;nonreentrant. That means, the use the same memory space.&lt;BR /&gt;&lt;BR /&gt;Lately I have written a vi with 2 instances of pid- controllers, which behaved very strangely. That was the&lt;BR /&gt;point where I stumbled over the reentrant stuff.&lt;BR /&gt;Because nonreentrant is default, and I never knew anything about reentrance before I just used my VIs...&lt;BR /&gt;Well the strangeness was, that the PID &lt;BR /&gt;VIs were accessed alternating and the internal results (shift registers)&lt;BR /&gt;of the previous used other PID-VI, were then used by the current accessed PID-VI. So there was no independance&lt;BR /&gt;between both PID instances, because the SHARED THE SAME MEMORY. If one is not aware of this circumstance, this&lt;BR /&gt;can be very confusing while debugging a VI. You see values changing of the strange behaving VI, and you don't&lt;BR /&gt;know why...&lt;BR /&gt;&lt;BR /&gt;Thats it so far,&lt;BR /&gt;&lt;BR /&gt;Rainer &lt;BR /&gt;</description>
      <pubDate>Tue, 26 Feb 2002 10:07:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35849#M23398</guid>
      <dc:creator>Rainer Ehrt</dc:creator>
      <dc:date>2002-02-26T10:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using a Local Variable on a button that has its mechanical actions set to latch when released</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35850#M23399</link>
      <description>Yes, there is, but dealing with it can be strange. You can use references to set the buttons "on". A better way is to handle the latching of the buttons yourself. I have attached a VI that checks a number of buttons on screen, returns the name of a button that was pressed and turns off that button. You give the VI a reference to the VI that you are checking buttons on and an array of strings that contains the names (labels) of the buttons to check. This is a great VI for feeding user input into a case statement. Inside this VI you will also find VIs for setting and reading booleans (buttons).&lt;BR /&gt;&lt;BR /&gt;This is the way that I would go. Since you are using references, you can even do all of this work in subVIs.&lt;BR /&gt;&lt;BR /&gt;     Rob &lt;BR /&gt;</description>
      <pubDate>Thu, 14 Feb 2002 22:57:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Using-a-Local-Variable-on-a-button-that-has-its-mechanical/m-p/35850#M23399</guid>
      <dc:creator>Rob Cole</dc:creator>
      <dc:date>2002-02-14T22:57:25Z</dc:date>
    </item>
  </channel>
</rss>

