<?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 event twice in different pleces in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672946#M596381</link>
    <description>&lt;P&gt;It sounds like you have some more fundamental problems in your code then simply trying to catch the event in two event structures. You should try to separate the UI processing from your actual processing tasks. From what you describe it sounds like your process and UI handling are mixed together. This results in unresponsive user interfaces which can lead to the problem you are seeing. The UI processing should be lean and mean. This way it is very responsive to the user. You may not be able to act immediately on their request but you can provide feedback that you received their request and are working on it. How quickly you can inject their request into your processing code will depend on how that is actually implemented.&lt;/P&gt;</description>
    <pubDate>Tue, 16 Aug 2011 21:35:14 GMT</pubDate>
    <dc:creator>Mark_Yedinak</dc:creator>
    <dc:date>2011-08-16T21:35:14Z</dc:date>
    <item>
      <title>using event twice in diffefent pleces</title>
      <link>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672862#M596360</link>
      <description>&lt;DIV&gt;Is it possible to have two event structures waiting for the same event?&lt;/DIV&gt;
&lt;DIV&gt;in my program there is one while loop which handles all the events (like the stop button etc.)&lt;/DIV&gt;
&lt;DIV&gt;In another place, the program has to wait for the stop button or a 'step' button or a user defined time (timeout).&lt;/DIV&gt;
&lt;DIV&gt;Currently, the main event structure writes True to step/ stop when they are pressed. I've tried using an event structure in this place too, but then the events que up, which i dont want to happen. Is there a way to use an event structure here, or is it fine this way?&lt;/DIV&gt;
&lt;DIV&gt;&lt;IMG src="http://forums.ni.com/t5/image/serverpage/image-id/50552i74F005A6DCFC9A62/image-size/original?v=mpbl-1&amp;amp;px=-1" border="0" alt="wait for stop or step.png" title="wait for stop or step.png" align="left" /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Ragnar&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Aug 2011 20:48:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672862#M596360</guid>
      <dc:creator>Raggie</dc:creator>
      <dc:date>2011-08-16T20:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: using event twice in different pleces</title>
      <link>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672896#M596365</link>
      <description>&lt;P&gt;Yes.&amp;nbsp; Two event structures can wait for the same event.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Without seeing your actual code, I don't know why you are having problems now with events queuing up.&amp;nbsp; Seeing the global variables in the bit of code you did post scares me a bit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2011 21:00:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672896#M596365</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2011-08-16T21:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: using event twice in different pleces</title>
      <link>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672910#M596368</link>
      <description>&lt;P&gt;If I understand correctly the OP wants Dynamic events.&lt;/P&gt;
&lt;P&gt;Dynamic events can be "registered" and "Unregistered" by any event loop (Or multiple event loops)&amp;nbsp; the dynamic events will not enqueue into the event structure's "event queue" unless the event structure is registered for that event at the time the event occurs.&amp;nbsp; So if "Stop" and "Step" were dynamic events (generated by a user key-press) you could press the button all day until the event was registered and fire the case after the next time the key was pressed.&amp;nbsp; &lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2011 21:14:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672910#M596368</guid>
      <dc:creator>JÞB</dc:creator>
      <dc:date>2011-08-16T21:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: using event twice in different pleces</title>
      <link>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672912#M596369</link>
      <description>&lt;P&gt;me too:P&lt;/P&gt;
&lt;P&gt;The globals are also used in some sub-vi's, but i am now trying to replace them by better ways of data transferring.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is that the code I posted is running only ocasionally, and the user could press the stop button a lot of times before the code executes first. (The stop button only 'restarts' part of the program in a while loop, I should have made that clear)&lt;/P&gt;
&lt;P&gt;If in that case the code executes for the first time, it still has a queued stop button value change, so it continues immediately.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2011 21:14:35 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672912#M596369</guid>
      <dc:creator>Raggie</dc:creator>
      <dc:date>2011-08-16T21:14:35Z</dc:date>
    </item>
    <item>
      <title>Re: using event twice in different pleces</title>
      <link>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672946#M596381</link>
      <description>&lt;P&gt;It sounds like you have some more fundamental problems in your code then simply trying to catch the event in two event structures. You should try to separate the UI processing from your actual processing tasks. From what you describe it sounds like your process and UI handling are mixed together. This results in unresponsive user interfaces which can lead to the problem you are seeing. The UI processing should be lean and mean. This way it is very responsive to the user. You may not be able to act immediately on their request but you can provide feedback that you received their request and are working on it. How quickly you can inject their request into your processing code will depend on how that is actually implemented.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2011 21:35:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/using-event-twice-in-diffefent-pleces/m-p/1672946#M596381</guid>
      <dc:creator>Mark_Yedinak</dc:creator>
      <dc:date>2011-08-16T21:35:14Z</dc:date>
    </item>
  </channel>
</rss>

