<?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: Function Global - Reetrant in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325597#M541069</link>
    <description>&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/9539"&gt;@Ben&lt;/a&gt; wrote:&lt;BR /&gt;Re-entrant AE used to be common when we had to poll the GUI and needed value change detection. They can also be used for running averages.
&lt;HR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, that is a valid use, but then we lose the "G" in "FGV". &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess the "AE" definition is wide enough to allow both.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was just trying to point out the conflicting statements in the thread title. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2010 16:00:59 GMT</pubDate>
    <dc:creator>altenbach</dc:creator>
    <dc:date>2010-11-30T16:00:59Z</dc:date>
    <item>
      <title>Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325511#M541059</link>
      <description>&lt;P&gt;Hi Experts!&lt;/P&gt;
&lt;P&gt;A long time passed since my last post, so here it is! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have function global for only prupose - to store data. I have two paralell loops, that calls this FG, for setting and getting data without any synchronization.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My only question is, what's happen when both loops operate on FG? (FG is not reetrant)&lt;/P&gt;
&lt;P&gt;All data set and get procedures are completed in booth loops, without unexpected error?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The method is simple, so there is no case for set and get the same data on same time, only different.&lt;/P&gt;
&lt;P&gt;I.e: &amp;nbsp; Loop1 -&amp;nbsp; Put : String_1 , Loop_2 - Put : String_2, or Loop_1 - Get: Number , Loop_2: Set String&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!!!!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:25:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325511#M541059</guid>
      <dc:creator>D60</dc:creator>
      <dc:date>2010-11-30T15:25:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325525#M541060</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the purpose of the FGV is to capsulate such data accesses. So you can call the FGV in two parallel loops - one call will wait till the other call is finished!&lt;/P&gt;
&lt;P&gt;And don't make the FGV reentrant, this will "hurt" the performance of your FGV &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://ni.lithium.com/i/smilies/16x16_smiley-wink.gif" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:29:37 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325525#M541060</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2010-11-30T15:29:37Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325539#M541062</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:35:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325539#M541062</guid>
      <dc:creator>D60</dc:creator>
      <dc:date>2010-11-30T15:35:14Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325551#M541064</link>
      <description>&lt;P&gt;I don't understand the purpose. If two locations randomly write to the same FGV from different locations, things are not very&amp;nbsp;deterministic. Since the stored value at any time critically depends on execution order of the various "writers", the outcome of a read operation cannot be predicted by looking at the code. This typically qualifies as race condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you would make it reentrant, it would no longer be "global", because each instance on the block diagram would be a separate instance and keep it's own data. What use is that? You might as well just use a shift register. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I misunderstood what you meant. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:38:21 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325551#M541064</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2010-11-30T15:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325561#M541065</link>
      <description>&lt;P&gt;My prupose is, try to use FG as a Global data storage in paralell loops. Thats all .. .:)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:41:16 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325561#M541065</guid>
      <dc:creator>D60</dc:creator>
      <dc:date>2010-11-30T15:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325563#M541066</link>
      <description>&lt;P&gt;My prupose is, try to use FG as a Global data storage in paralell loops. Thats all .. .:)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:41:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325563#M541066</guid>
      <dc:creator>D60</dc:creator>
      <dc:date>2010-11-30T15:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325565#M541067</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/7614"&gt;@altenbach&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;I don't understand the purpose. If two locations randomly write to the same FGV from different locations, things are not very&amp;nbsp;deterministic. Since the stored value at any time critically depends on execution order of the various "writers", the outcome of a read operation cannot be predicted by looking at the code. This typically qualifies as race condition.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If you would make it reentrant, it would no longer be "global", because each instance on the block diagram would be a separate instance and keep it's own data. &lt;FONT size="3"&gt;What use is that? &lt;/FONT&gt;You might as well just use a shift register. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I misunderstood what you meant. &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Re-entrant AE used to be common when we had to poll the GUI and needed value change detection. They can also be used for running averages.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 15:42:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325565#M541067</guid>
      <dc:creator>Ben</dc:creator>
      <dc:date>2010-11-30T15:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325597#M541069</link>
      <description>&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/9539"&gt;@Ben&lt;/a&gt; wrote:&lt;BR /&gt;Re-entrant AE used to be common when we had to poll the GUI and needed value change detection. They can also be used for running averages.
&lt;HR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, that is a valid use, but then we lose the "G" in "FGV". &lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess the "AE" definition is wide enough to allow both.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was just trying to point out the conflicting statements in the thread title. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:00:59 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325597#M541069</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2010-11-30T16:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325611#M541071</link>
      <description>&lt;P&gt;BTW, I have two Loops, and every Loop calls one (same) VI with VI-server. (the called vi is only a function i.e.: Add 2 values)&lt;/P&gt;
&lt;P&gt;Any Ideas?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:09:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325611#M541071</guid>
      <dc:creator>D60</dc:creator>
      <dc:date>2010-11-30T16:09:02Z</dc:date>
    </item>
    <item>
      <title>Re: Function Global - Reetrant</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325665#M541078</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;HR /&gt;
Durnek wrote:
&lt;P&gt;Any Ideas?&lt;/P&gt;
&lt;HR /&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not really. There are millions of possible VIs that fit that description. Why don't you show us some code instead. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What kind of ideas are you looking for? (prettier, faster, better, clearer, easier to maintain, ...?)&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2010 16:34:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Function-Global-Reetrant/m-p/1325665#M541078</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2010-11-30T16:34:05Z</dc:date>
    </item>
  </channel>
</rss>

