<?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 Press and delay button with case structure in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251763#M1237183</link>
    <description>&lt;P&gt;In the program attached below, the arm/disarm led will turn on when I press button 2 and will turn off when i press button 3.&lt;/P&gt;
&lt;P&gt;This is a prototype program for arming/disarming a vehicle.&lt;/P&gt;
&lt;P&gt;I want to modify the program such that when i press button 2/3 for 2 seconds, only then they perform the desired function. if i press for less than 2 seconds, nothing happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I do that?&lt;/P&gt;</description>
    <pubDate>Fri, 26 Aug 2022 07:49:25 GMT</pubDate>
    <dc:creator>sarwatsarfaraz</dc:creator>
    <dc:date>2022-08-26T07:49:25Z</dc:date>
    <item>
      <title>Press and delay button with case structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251763#M1237183</link>
      <description>&lt;P&gt;In the program attached below, the arm/disarm led will turn on when I press button 2 and will turn off when i press button 3.&lt;/P&gt;
&lt;P&gt;This is a prototype program for arming/disarming a vehicle.&lt;/P&gt;
&lt;P&gt;I want to modify the program such that when i press button 2/3 for 2 seconds, only then they perform the desired function. if i press for less than 2 seconds, nothing happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I do that?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 07:49:25 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251763#M1237183</guid>
      <dc:creator>sarwatsarfaraz</dc:creator>
      <dc:date>2022-08-26T07:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Press and delay button with case structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251773#M1237190</link>
      <description>&lt;P&gt;Hi sarwat,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/703160"&gt;@sarwatsarfaraz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;In the program attached below,&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;There is no program, just two images showing parts of your code…&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/703160"&gt;@sarwatsarfaraz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to modify the program such that when i press button 2/3 for 2 seconds, only then they perform the desired function. if i press for less than 2 seconds, nothing happens.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I do that?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I recommend to use the event structure in favor of that InputDevice functions.&lt;/P&gt;
&lt;P&gt;Then you need to store the timestamp of the "button press" event in a shift register. You can use the timeout event to check for your "minimum 2s delay" and you can also monitor any "button release" events…&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 08:24:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251773#M1237190</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2022-08-26T08:24:28Z</dc:date>
    </item>
    <item>
      <title>Rif.: Press and delay button with case structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251780#M1237196</link>
      <description>&lt;P&gt;You should "filter" your button signal. On the rising edge, you should register the switch time. Then, you continuosly check Tnow - Tswitch.&lt;/P&gt;
&lt;P&gt;Have a look to the attached code.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 08:51:32 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251780#M1237196</guid>
      <dc:creator>andcadev</dc:creator>
      <dc:date>2022-08-26T08:51:32Z</dc:date>
    </item>
    <item>
      <title>Re: Press and delay button with case structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251905#M1237226</link>
      <description>&lt;P&gt;As a first step, you need to define the problem fully. For example what should happen if both buttons are pressed for 2 seconds?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:21:37 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251905#M1237226</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2022-08-26T15:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: Press and delay button with case structure</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251919#M1237230</link>
      <description>&lt;P&gt;Since you seem to prefer pictures over actual VIs, here's one simple possibility to turn on an LED after the button 2 has been pressed for 2 seconds. No need for local variables and case structures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can easily expand it for more buttons and the desired behavior for each once you exactly define the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="altenbach_0-1661528982255.png" style="width: 999px;"&gt;&lt;img src="https://ip1.i.lithium.com/d352996f1c0ca06092b0535f378fb72796b86512/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f33303733373269313142353236413833323235353439462f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="altenbach_0-1661528982255.png" alt="altenbach_0-1661528982255.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Aug 2022 15:49:55 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Press-and-delay-button-with-case-structure/m-p/4251919#M1237230</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2022-08-26T15:49:55Z</dc:date>
    </item>
  </channel>
</rss>

