<?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: start a new thread in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/start-a-new-thread/m-p/6181#M4792</link>
    <description>Thanks for the "Set Control Value" tip.  I was using a "call by reference" node&lt;BR /&gt;to initialize the child vi.  Seems one can not intermix the "call by reference"&lt;BR /&gt;and the "invoke node" blocks in this case?????  When I  used the "Set Control&lt;BR /&gt;Value" things ran as expected.&lt;BR /&gt;&lt;BR /&gt;                                                                    thanks&lt;BR /&gt;again,&lt;BR /&gt;                                                                            --&lt;BR /&gt;Bill --&lt;BR /&gt;&lt;BR /&gt;Jean-Pierre Drolet wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; The method you described should work as you expect.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; When you open the child.vi copy and use "Run VI" method, the child runs by&lt;BR /&gt;&amp;gt; itself as a top VI.&lt;BR /&gt;&amp;gt; After it is finished, its VI reference must be closed to release it from&lt;BR /&gt;&amp;gt; memory and the file copy eventually deleted.&lt;BR /&gt;&amp;gt; The child.vi can do this before it exits if you pass to it its own VI&lt;BR /&gt;&amp;gt; reference (I use "Set Control Value") from the parent.vi.&lt;BR /&gt;&amp;gt; Then when the child.vi task is finished, it can delete its file copy ( using&lt;BR /&gt;&amp;gt; "Get VI path" method) and close its VI reference.&lt;BR /&gt;&amp;gt; Make sure that closing the VI reference is the last thing you do in the VI&lt;BR /&gt;&amp;gt; since the close halts the VI execution and release it from memory.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; Jen-Pierre Drolet&lt;BR /&gt;&amp;gt; Scientech R&amp;amp;D inc.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; William R. Doggett &lt;W.R.DOGGETT&gt; a �crit dans le message :&lt;BR /&gt;&amp;gt; 38F38ECD.C4B01402@larc.nasa.gov...&lt;BR /&gt;&amp;gt; &amp;gt; Hello,&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt;     I'm running LV 5.1.1 on a W98 PC.&lt;BR /&gt;&amp;gt; &amp;gt;     I'd like to know how to programmatically start another thread from&lt;BR /&gt;&amp;gt; &amp;gt; within labview.  I.e. is there anyway to duplicate the unix fork?&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt;     I'd like to build a server (parent.vi) in labview that receives a&lt;BR /&gt;&amp;gt; &amp;gt; request, starts a vi (child.vi) to handle the request and spawns it off&lt;BR /&gt;&amp;gt; &amp;gt; as a low priority task/thread so that the server may continue to process&lt;BR /&gt;&amp;gt; &amp;gt; additional incoming requests.  When child.vi is complete it&lt;BR /&gt;&amp;gt; &amp;gt; exits/terminates.&lt;BR /&gt;&amp;gt; &amp;gt;     I've looked into the vi server documentation and attempted a trick&lt;BR /&gt;&amp;gt; &amp;gt; Greg M. mentioned ... copying the child.vi to a new name, loading it and&lt;BR /&gt;&amp;gt; &amp;gt; executing it, but this forces a loop in the server to keep track of the&lt;BR /&gt;&amp;gt; &amp;gt; children and call them sequentually.  As some tasks are quick, others&lt;BR /&gt;&amp;gt; &amp;gt; longer, I'd sure like to just let each child.vi run independently and&lt;BR /&gt;&amp;gt; &amp;gt; terminate when finished.&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt;                                                             all&lt;BR /&gt;&amp;gt; &amp;gt; suggestions welcome,&lt;BR /&gt;&amp;gt; &amp;gt;                                                                 thanks,&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt; -- Bill --&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&lt;/W.R.DOGGETT&gt;</description>
    <pubDate>Thu, 13 Apr 2000 14:22:10 GMT</pubDate>
    <dc:creator>Bill</dc:creator>
    <dc:date>2000-04-13T14:22:10Z</dc:date>
    <item>
      <title>start a new thread</title>
      <link>https://ni.lithium.com/t5/LabVIEW/start-a-new-thread/m-p/6179#M4790</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;    I'm running LV 5.1.1 on a W98 PC.&lt;BR /&gt;    I'd like to know how to programmatically start another thread from&lt;BR /&gt;within labview.  I.e. is there anyway to duplicate the unix fork?&lt;BR /&gt;&lt;BR /&gt;    I'd like to build a server (parent.vi) in labview that receives a&lt;BR /&gt;request, starts a vi (child.vi) to handle the request and spawns it off&lt;BR /&gt;as a low priority task/thread so that the server may continue to process&lt;BR /&gt;additional incoming requests.  When child.vi is complete it&lt;BR /&gt;exits/terminates.&lt;BR /&gt;    I've looked into the vi server documentation and attempted a trick&lt;BR /&gt;Greg M. mentioned ... copying the child.vi to a new name, loading it and&lt;BR /&gt;executing it, but this forces a loop in the server to keep track of the&lt;BR /&gt;children and call them sequentually.  As some tasks ar&lt;BR /&gt;e quick, others&lt;BR /&gt;longer, I'd sure like to just let each child.vi run independently and&lt;BR /&gt;terminate when finished.&lt;BR /&gt;&lt;BR /&gt;                                                            all&lt;BR /&gt;suggestions welcome,&lt;BR /&gt;                                                                thanks,&lt;BR /&gt;&lt;BR /&gt;-- Bill -- &lt;BR /&gt;</description>
      <pubDate>Tue, 11 Apr 2000 20:45:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/start-a-new-thread/m-p/6179#M4790</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2000-04-11T20:45:02Z</dc:date>
    </item>
    <item>
      <title>Re: start a new thread</title>
      <link>https://ni.lithium.com/t5/LabVIEW/start-a-new-thread/m-p/6180#M4791</link>
      <description>The method you described should work as you expect.&lt;BR /&gt;&lt;BR /&gt;When you open the child.vi copy and use "Run VI" method, the child runs by&lt;BR /&gt;itself as a top VI.&lt;BR /&gt;After it is finished, its VI reference must be closed to release it from&lt;BR /&gt;memory and the file copy eventually deleted.&lt;BR /&gt;The child.vi can do this before it exits if you pass to it its own VI&lt;BR /&gt;reference (I use "Set Control Value") from the parent.vi.&lt;BR /&gt;Then when the child.vi task is finished, it can delete its file copy ( using&lt;BR /&gt;"Get VI path" method) and close its VI reference.&lt;BR /&gt;Make sure that closing the VI reference is the last thing you do in the VI&lt;BR /&gt;since the close halts the VI execution and release it from memory.&lt;BR /&gt;&lt;BR /&gt;Jen-Pierre Drolet&lt;BR /&gt;Scientech R&amp;amp;D inc.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;William R. Doggett &lt;W.R.DOGGETT&gt; a écrit dans le messa&lt;BR /&gt;ge :&lt;BR /&gt;38F38ECD.C4B01402@larc.nasa.gov...&lt;BR /&gt;&amp;gt; Hello,&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;     I'm running LV 5.1.1 on a W98 PC.&lt;BR /&gt;&amp;gt;     I'd like to know how to programmatically start another thread from&lt;BR /&gt;&amp;gt; within labview.  I.e. is there anyway to duplicate the unix fork?&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;     I'd like to build a server (parent.vi) in labview that receives a&lt;BR /&gt;&amp;gt; request, starts a vi (child.vi) to handle the request and spawns it off&lt;BR /&gt;&amp;gt; as a low priority task/thread so that the server may continue to process&lt;BR /&gt;&amp;gt; additional incoming requests.  When child.vi is complete it&lt;BR /&gt;&amp;gt; exits/terminates.&lt;BR /&gt;&amp;gt;     I've looked into the vi server documentation and attempted a trick&lt;BR /&gt;&amp;gt; Greg M. mentioned ... copying the child.vi to a new name, loading it and&lt;BR /&gt;&amp;gt; executing it, but this forces a loop in the server to keep track of the&lt;BR /&gt;&amp;gt; children and call them sequentually.  As some tasks are quick, others&lt;BR /&gt;&amp;gt; longer, I'd sure like to just let each child.vi run independently and&lt;BR /&gt;&amp;gt; terminate when finished.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt;                                                             all&lt;BR /&gt;&amp;gt; &lt;BR /&gt;suggestions welcome,&lt;BR /&gt;&amp;gt;                                                                 thanks,&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; -- Bill --&lt;BR /&gt;&amp;gt; &lt;BR /&gt;&lt;/W.R.DOGGETT&gt;</description>
      <pubDate>Tue, 11 Apr 2000 22:10:28 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/start-a-new-thread/m-p/6180#M4791</guid>
      <dc:creator>Jean-Pierre Drolet</dc:creator>
      <dc:date>2000-04-11T22:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: start a new thread</title>
      <link>https://ni.lithium.com/t5/LabVIEW/start-a-new-thread/m-p/6181#M4792</link>
      <description>Thanks for the "Set Control Value" tip.  I was using a "call by reference" node&lt;BR /&gt;to initialize the child vi.  Seems one can not intermix the "call by reference"&lt;BR /&gt;and the "invoke node" blocks in this case?????  When I  used the "Set Control&lt;BR /&gt;Value" things ran as expected.&lt;BR /&gt;&lt;BR /&gt;                                                                    thanks&lt;BR /&gt;again,&lt;BR /&gt;                                                                            --&lt;BR /&gt;Bill --&lt;BR /&gt;&lt;BR /&gt;Jean-Pierre Drolet wrote:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; The method you described should work as you expect.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; When you open the child.vi copy and use "Run VI" method, the child runs by&lt;BR /&gt;&amp;gt; itself as a top VI.&lt;BR /&gt;&amp;gt; After it is finished, its VI reference must be closed to release it from&lt;BR /&gt;&amp;gt; memory and the file copy eventually deleted.&lt;BR /&gt;&amp;gt; The child.vi can do this before it exits if you pass to it its own VI&lt;BR /&gt;&amp;gt; reference (I use "Set Control Value") from the parent.vi.&lt;BR /&gt;&amp;gt; Then when the child.vi task is finished, it can delete its file copy ( using&lt;BR /&gt;&amp;gt; "Get VI path" method) and close its VI reference.&lt;BR /&gt;&amp;gt; Make sure that closing the VI reference is the last thing you do in the VI&lt;BR /&gt;&amp;gt; since the close halts the VI execution and release it from memory.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; Jen-Pierre Drolet&lt;BR /&gt;&amp;gt; Scientech R&amp;amp;D inc.&lt;BR /&gt;&amp;gt;&lt;BR /&gt;&amp;gt; William R. Doggett &lt;W.R.DOGGETT&gt; a �crit dans le message :&lt;BR /&gt;&amp;gt; 38F38ECD.C4B01402@larc.nasa.gov...&lt;BR /&gt;&amp;gt; &amp;gt; Hello,&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt;     I'm running LV 5.1.1 on a W98 PC.&lt;BR /&gt;&amp;gt; &amp;gt;     I'd like to know how to programmatically start another thread from&lt;BR /&gt;&amp;gt; &amp;gt; within labview.  I.e. is there anyway to duplicate the unix fork?&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt;     I'd like to build a server (parent.vi) in labview that receives a&lt;BR /&gt;&amp;gt; &amp;gt; request, starts a vi (child.vi) to handle the request and spawns it off&lt;BR /&gt;&amp;gt; &amp;gt; as a low priority task/thread so that the server may continue to process&lt;BR /&gt;&amp;gt; &amp;gt; additional incoming requests.  When child.vi is complete it&lt;BR /&gt;&amp;gt; &amp;gt; exits/terminates.&lt;BR /&gt;&amp;gt; &amp;gt;     I've looked into the vi server documentation and attempted a trick&lt;BR /&gt;&amp;gt; &amp;gt; Greg M. mentioned ... copying the child.vi to a new name, loading it and&lt;BR /&gt;&amp;gt; &amp;gt; executing it, but this forces a loop in the server to keep track of the&lt;BR /&gt;&amp;gt; &amp;gt; children and call them sequentually.  As some tasks are quick, others&lt;BR /&gt;&amp;gt; &amp;gt; longer, I'd sure like to just let each child.vi run independently and&lt;BR /&gt;&amp;gt; &amp;gt; terminate when finished.&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt;                                                             all&lt;BR /&gt;&amp;gt; &amp;gt; suggestions welcome,&lt;BR /&gt;&amp;gt; &amp;gt;                                                                 thanks,&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&amp;gt; &amp;gt; -- Bill --&lt;BR /&gt;&amp;gt; &amp;gt;&lt;BR /&gt;&lt;/W.R.DOGGETT&gt;</description>
      <pubDate>Thu, 13 Apr 2000 14:22:10 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/start-a-new-thread/m-p/6181#M4792</guid>
      <dc:creator>Bill</dc:creator>
      <dc:date>2000-04-13T14:22:10Z</dc:date>
    </item>
  </channel>
</rss>

