<?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: Curious Loop Behavoir in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082418#M479215</link>
    <description>You didn't change the mechanical action of the Boolean like I said in my last sentence of my reply. You need to use one of the "switch" actions.</description>
    <pubDate>Tue, 02 Mar 2010 23:07:52 GMT</pubDate>
    <dc:creator>smercurio_fc</dc:creator>
    <dc:date>2010-03-02T23:07:52Z</dc:date>
    <item>
      <title>Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082335#M479177</link>
      <description>&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;I know I'm going to get schooled on this curious loop behavior but felt like posting.&amp;nbsp; The desired behavior of Fred&amp;nbsp;2.vi is to interrupt an existing ms delay in Delayed Fred.vi to allow for faster exit of a sub-routine once STOP is pushed.&amp;nbsp; I'm guessing this can be done a number of way possible the quickest with an event routine checking for stop, but I honestly don't know.&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;I decided to show a guy how to do it with a simple conditional for routine but to my surprise it doesn't work.&amp;nbsp; Then I convinced myself that the TRUE variable is local to the function and should not update.&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;What is the correct way to do this and why doesn’t the way I did it work? &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Wingdings"&gt;&lt;SPAN&gt;J&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;I need some feedback since I honestly don't know what is wrong.&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;Regards,&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 9pt; color: #666666; font-family: Verdana"&gt;-SS&lt;/SPAN&gt; &lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by ShotSimon on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 03-02-2010&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 03:34 PM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Mar 2010 21:34:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082335#M479177</guid>
      <dc:creator>ShotSimon</dc:creator>
      <dc:date>2010-03-02T21:34:14Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082342#M479182</link>
      <description>&lt;P&gt;The stop boolean is not being polled, so the loop is not going to stop from a&amp;nbsp;user input.&amp;nbsp; Not sure is that the problem or not.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yik&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2010 21:30:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082342#M479182</guid>
      <dc:creator>jyang72211</dc:creator>
      <dc:date>2010-03-02T21:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082348#M479185</link>
      <description>Delay Fred reads the incoming Boolean once and keeps the value, thus never changing. Thus no interrupt.</description>
      <pubDate>Tue, 02 Mar 2010 21:33:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082348#M479185</guid>
      <dc:creator>Yamaeda</dc:creator>
      <dc:date>2010-03-02T21:33:02Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082350#M479187</link>
      <description>Sorry I pulled out the boolean during testing, but if you put it inside it doesn't change operation for me?&amp;nbsp; I reposted the vi above since I was under the 15min edit window.&amp;nbsp; -SS</description>
      <pubDate>Tue, 02 Mar 2010 21:36:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082350#M479187</guid>
      <dc:creator>ShotSimon</dc:creator>
      <dc:date>2010-03-02T21:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082351#M479188</link>
      <description>&lt;P&gt;Classic dataflow problem. When you run Fred_2 the values of its front panel controls are passed to the subVI. Changing these while the subVI is running does &lt;U&gt;absolutely nothing&lt;/U&gt; to the subVI. Furthermore, while the subVI is running, the Stop button on its front panel is only read when it starts. While the for-loop in the subVI is running it is using the value from when the loop first started since it's being tunneled in. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want the loop inside the subVI to stop based on a stop condition of a Stop button on the front panel of the main VI then you need to pass a reference to the top VI's Stop button to the subVI. Inside the subVI's for-loop use the Value property to read the state of the top-level VI's Stop button. Note that you will need to change the latching action in order to be able to read the value. &lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2010 21:38:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082351#M479188</guid>
      <dc:creator>smercurio_fc</dc:creator>
      <dc:date>2010-03-02T21:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavior</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082356#M479189</link>
      <description>Pass a reference to the boolean in your higher level VI to the subVI.&amp;nbsp; Instead of the stop button in your subVI (which can't change because the subVI's front panel doesn't open) you will read the value of the reference to the stop&amp;nbsp;control passed in.</description>
      <pubDate>Tue, 02 Mar 2010 21:40:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082356#M479189</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2010-03-02T21:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082359#M479191</link>
      <description>Yeah I knew it was a classic.&amp;nbsp; I guess I'm surprised that I always managed to avoid this issue. Thanks guys. -SS</description>
      <pubDate>Tue, 02 Mar 2010 21:44:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082359#M479191</guid>
      <dc:creator>ShotSimon</dc:creator>
      <dc:date>2010-03-02T21:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082395#M479206</link>
      <description>&lt;P&gt;OK it's not solved sorry:)&amp;nbsp; I tried to create a reference and llink it to the from panel and I get a conflict between strict and regular boolean&amp;nbsp;reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I make a happy connection here, please see attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-SS&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by ShotSimon on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 03-02-2010&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 04:34 PM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Mar 2010 22:34:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082395#M479206</guid>
      <dc:creator>ShotSimon</dc:creator>
      <dc:date>2010-03-02T22:34:31Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082418#M479215</link>
      <description>You didn't change the mechanical action of the Boolean like I said in my last sentence of my reply. You need to use one of the "switch" actions.</description>
      <pubDate>Tue, 02 Mar 2010 23:07:52 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082418#M479215</guid>
      <dc:creator>smercurio_fc</dc:creator>
      <dc:date>2010-03-02T23:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082904#M479411</link>
      <description>&lt;P&gt;smercurio_fc ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sorry you'll have to forgive me.&amp;nbsp; At the time I didn't see how editing the front panel would help make the reference a different type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess my little LabVIEW world was turned upside down learning that in all these years I never had to use a reference, like this:)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I should share with other that to place a reference you have find it in the library and then set it by right clicking and chosing:&lt;/P&gt;&lt;P&gt;VI Server Reference -&amp;gt; Generic -&amp;gt; GObject -&amp;gt; Control -&amp;gt; Boolean &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You also have to make sure include data type is selected on the front panel control.&amp;nbsp; The working updated vi is attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-SS&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2010 15:26:16 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082904#M479411</guid>
      <dc:creator>ShotSimon</dc:creator>
      <dc:date>2010-03-03T15:26:16Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082910#M479413</link>
      <description>&lt;P&gt;Actually, you don't need to do all that. If you want to pass a reference to a subVI the easiest way to do it is to create the reference in the calling VI (right-click on front panel object and select Create-&amp;gt;Reference). Then, open the front panel of the subVI. Drag the reference from the block diagram of the calling VI to the front panel of the subVI. Done.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the reason why you have to change the switching action is because the latch action is incompatible with local variables and the &lt;A href="https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8WLSA0&amp;amp;l=en-US" target="_self"&gt;Value property&lt;/A&gt;.&lt;/P&gt;
&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by smercurio_fc on &lt;/SPAN&gt;&lt;SPAN class="local-date"&gt; 03-03-2010&lt;/SPAN&gt;&lt;SPAN class="local-time"&gt; 09:31 AM&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Mar 2024 20:32:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1082910#M479413</guid>
      <dc:creator>smercurio_fc</dc:creator>
      <dc:date>2024-03-18T20:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: Curious Loop Behavoir</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1083005#M479444</link>
      <description>&lt;P&gt;At one point, this the switch vs latch problem really put me down.&amp;nbsp; Thanks for the explaination.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yik&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2010 16:34:54 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Curious-Loop-Behavoir/m-p/1083005#M479444</guid>
      <dc:creator>jyang72211</dc:creator>
      <dc:date>2010-03-03T16:34:54Z</dc:date>
    </item>
  </channel>
</rss>

