<?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: How to implement single and continuous run? in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479766#M758131</link>
    <description>&lt;P&gt;i was suggesting link this mode control to the stop in the while loop&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2013 10:50:24 GMT</pubDate>
    <dc:creator>Akiel</dc:creator>
    <dc:date>2013-07-03T10:50:24Z</dc:date>
    <item>
      <title>How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479686#M758114</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi All:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I add two controls on front panel, a "single" button, and a "continuous " one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When "single" is pressed, the sub VI will execute only once.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when "continuous" is pressed, the sub VI will execute continously.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think I can use a while event structure , which captures the button events,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13px; line-height: 15px;"&gt;for "single button clicked event ", I just put sub VI &amp;nbsp;into the diagram.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13px; line-height: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For "continuous" condition, I will circle the sub VI with a while loop, inside the event diagram.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But now the problem is : &amp;nbsp;how should I wire the stop button for this while loop?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it should stop as soon as "single " button clicked, because now I am going to switch to "single" state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I should wire the single button to the stop button?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do you have other solutions?&lt;/P&gt;
&lt;P&gt;Any suggestions will be greatly appreciated. Many thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:38:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479686#M758114</guid>
      <dc:creator>Julia2013</dc:creator>
      <dc:date>2013-07-03T09:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479706#M758118</link>
      <description>&lt;P&gt;&amp;nbsp;can post your vi or the snippet of what you are doing&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 09:51:39 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479706#M758118</guid>
      <dc:creator>RChoudhary</dc:creator>
      <dc:date>2013-07-03T09:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479726#M758121</link>
      <description>&lt;P&gt;without seeing what you have got. remember a while loop always executes at least once. use you single/continuous boolean control wired straight to the stop terminal of the while loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As asked for though will be easier to answer if we can see the code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope it helps though&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:12:53 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479726#M758121</guid>
      <dc:creator>Akiel</dc:creator>
      <dc:date>2013-07-03T10:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479732#M758123</link>
      <description>&lt;P&gt;Hi Julia,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please have a look on this VI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think this will resolve your query.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:20:30 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479732#M758123</guid>
      <dc:creator>Himanshu_Goyal</dc:creator>
      <dc:date>2013-07-03T10:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479760#M758129</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/264598"&gt;@Julia2013&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I add two controls on front panel, a "single" button, and a "continuous " one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any suggestions will be greatly appreciated. Many thanks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why to add two controls, rather keep single 'Toggle' switch:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/d1ed901bb41dfb2495e8b39d24a944a7cee72221/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31313336303869353334374534393237304633333530462f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Single button.png" title="Single button.png" align="center" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:46:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479760#M758129</guid>
      <dc:creator>moderator1983</dc:creator>
      <dc:date>2013-07-03T10:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479766#M758131</link>
      <description>&lt;P&gt;i was suggesting link this mode control to the stop in the while loop&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2013 10:50:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2479766#M758131</guid>
      <dc:creator>Akiel</dc:creator>
      <dc:date>2013-07-03T10:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2481084#M758375</link>
      <description>&lt;P&gt;Hi All:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am really grateful to so many people helping! Thank you all.&amp;nbsp;&lt;SPAN style="font-size: 13px; line-height: 15px;"&gt;I will give kudos as I look into more details.:)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached are two VIs. &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; s&lt;SPAN style="font-size: 13px; line-height: 15px;"&gt;ubVI is "LED blink once.vi"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to make the LED blink once, when single button is clicked.&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 13px; line-height: 15px;"&gt;And it blinks continously when continuous button clicked.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the continuous event, I use one more while -event structure,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where I put the subVI inside its "timeout" event, while pass "true" to stop this while loop inside "single mouse down"&amp;nbsp;&lt;SPAN style="font-size: 13px; line-height: 15px;"&gt;event.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the VI runs with problems.&lt;/P&gt;
&lt;P&gt;As soon as it run, after I clicked the "single" button once, I can no more click on any other buttons such as continous or stop!&lt;/P&gt;
&lt;P&gt;The same problems with the other two buttons.&lt;/P&gt;
&lt;P&gt;Seems I can only click on one button as soon as it starts to run, all other buttons failed to respond.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why ?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 06:44:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2481084#M758375</guid>
      <dc:creator>Julia2013</dc:creator>
      <dc:date>2013-07-04T06:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement single and continuous run?</title>
      <link>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2481312#M758418</link>
      <description>&lt;P&gt;First of all, I highly recommend using the Value Change event instead of the Mouse Down.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Secondly, you shouldn't have an event structure inside of an event structure.&amp;nbsp; In general, you should have 1 event structure in a VI.&amp;nbsp; The reason is because there are many caveats of the event structure, and just using 1 of them alleviates most of those.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you really want here is a version of the Master/Slave architecture.&amp;nbsp; You have 1 loop for handling the events and another loop to control your blinking.&amp;nbsp; You can use a notifier to communicate between the loops.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2013 11:45:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/How-to-implement-single-and-continuous-run/m-p/2481312#M758418</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2013-07-04T11:45:02Z</dc:date>
    </item>
  </channel>
</rss>

