<?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: Bytestream File Refnum issue in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129432#M899331</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Raghunathan wrote:
&lt;P&gt;1. The Black Sub Vi just returns the current path based on the situation - whether in Design mode or Run time system.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/e09dba4a1be3a194fb4f2e212c003e1ae2a463eb/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363636373369413437343241394330454338453642302f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Current Path String.PNG" title="Current Path String.PNG" width="478" height="210" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I would recommend throwing that VI away.&amp;nbsp; Instead, use the Application Directory function.&amp;nbsp; That functon returns the folder of the project file when in the development environment or the folder of the executable in the RTE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Raghunathan wrote:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;2. File I/O inside a Timed is a true concern. But &amp;nbsp;then my acquistion rate is rather slow at once per minute. And the user needs the plot to reflect only once per hour intervals. So I thought its simpler to do what I did even if it means opening and closing the Spread Sheet file 1440 times a day. Not much ?? Anyway I do agree the overhead of the Timed Loop and have since changed to a simple while loop. &lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A timed loop slated to loop once a minute?!&amp;nbsp; What if the user needs to abort or do some other function?&amp;nbsp; A minute is an eternity to a user.&amp;nbsp; Instead of the timed loop, use a state machine.&amp;nbsp; This way you can check for users trying to do something.&amp;nbsp; Just have a state to check how much time has elapsed.&amp;nbsp; Once your minute is up, you can take another measurement.&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2015 18:00:58 GMT</pubDate>
    <dc:creator>crossrulz</dc:creator>
    <dc:date>2015-05-04T18:00:58Z</dc:date>
    <item>
      <title>Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128845#M899070</link>
      <description>&lt;P&gt;I am dynamically creating a file name using current date .&lt;/P&gt;
&lt;P&gt;Once created, I open a file with the name. Since the code is in a timed loop, I open the file inside a case structure which fires only once.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I pass on the File Refnum to a Write-To-Spreadsheet function to write data once every minute.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the above works well on my Laptop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But when the code is loaded on the client machine( which has a LV12 Run Time Engine) , for every Spread Sheet Write, it pops up the File Dialog box asking for a file name. Obviously the ByteStream Refnum property node does not seem to work ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I dont know what is different on the client machine. My Laptop is a WIN7/ 64 Bit system. Client machine is a WIN 7 / 32 Bit system.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The relevant code is below :&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/b60a9ca5e7917b9e46971970bb7293b890aef524/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363636313669334541443238393943383531393532422f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Path Issue.PNG" title="Path Issue.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2015 10:06:18 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128845#M899070</guid>
      <dc:creator>MogaRaghu</dc:creator>
      <dc:date>2015-05-03T10:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128854#M899076</link>
      <description>Why don't you simply create an indicator for the path? I'm sure it's incorrect because of the building into an exe. Opening the file and getting a reference is not required. The Write to Spreadsheet will do that and you just set it to append. Correctly build a path and you can use a shift register to store it. Your code is much to convoluted with the local variables.</description>
      <pubDate>Sun, 03 May 2015 12:32:58 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128854#M899076</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2015-05-03T12:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128856#M899078</link>
      <description>You wrote " it's incorrect because of the building into an EXE " I am not sure which is incorrect. It does work as EXE in my laptop. Please clarify ...&lt;BR /&gt;&lt;BR /&gt;Never knew the Write to Spreadsheet function will open or create the file. Thanks.</description>
      <pubDate>Sun, 03 May 2015 13:04:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128856#M899078</guid>
      <dc:creator>MogaRaghu</dc:creator>
      <dc:date>2015-05-03T13:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128859#M899081</link>
      <description>Please look at the path, then. No idea from your image where the file is supposed to exist.</description>
      <pubDate>Sun, 03 May 2015 13:18:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128859#M899081</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2015-05-03T13:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128861#M899082</link>
      <description>&lt;P&gt;Somewhere, you have a loop that fires once a minute and includes the Write to Spreadsheet function. &amp;nbsp;Put the File Open/Create code&amp;nbsp;&lt;U&gt;outside&lt;/U&gt; (in front of) this loop so you demonstrably only do it once, you&amp;nbsp;&lt;U&gt;never&lt;/U&gt; do it inside the loop, and you use the File Refnum created&amp;nbsp;&lt;U&gt;outside&lt;/U&gt; the loop to save the data generated&amp;nbsp;&lt;U&gt;inside&lt;/U&gt; the loop. &amp;nbsp;When you exit the loop (having written all of the data), you can safely close the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Much simpler, logic is intuitive, no need for Case Statements, for (mis-used) Local Variables to guarantee opening the file once, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bob Schor&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2015 13:33:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128861#M899082</guid>
      <dc:creator>Bob_Schor</dc:creator>
      <dc:date>2015-05-03T13:33:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128867#M899083</link>
      <description>If you are going to create a new file once a day, you have to put it inside the loop. As long as it it is called once a day, that's perfectly fine. What you would never do is mix the file open/reference and the Write to Spreadsheet File. You would use Spreadsheet String to Array with a Write to Text File when using the reference so that the file only opens once.</description>
      <pubDate>Sun, 03 May 2015 14:11:40 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128867#M899083</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2015-05-03T14:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128876#M899089</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/95728"&gt;@Bob_Schor&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;..... Put the File Open/Create code&amp;nbsp;&lt;U&gt;outside&lt;/U&gt; (in front of) this loop so you demonstrably only do it once, you&amp;nbsp;&lt;U&gt;never&lt;/U&gt; do it inside the loop, and you use the File Refnum created&amp;nbsp;&lt;U&gt;outside&lt;/U&gt; the loop to save the data generated&amp;nbsp;&lt;U&gt;inside&lt;/U&gt; the loop. &amp;nbsp;When you exit the loop (having written all of the data), you can safely close the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Much simpler, logic is intuitive, no need for Case Statements, for (mis-used) Local Variables to guarantee opening the file once, etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bob Schor&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What you wrote is generally what is done. But then exceptions exist - in my case there is no way I can generate the file name outside the 0.5 Sec Timed Loop. OK this was not obvious in my original post - but then my problem was different - the same EXE works fine on a laprtop on which it was built. But on &amp;nbsp;the client desktop, keeps asking for File Name for every write to the Spread Sheet. That I guess is still not answered..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;( The image shows 5 instead 120 of logging. This is only for checking the logic )&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/983563eb7574d8163de25d1d9f98732158d4d8ed/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363636323269373230453433424636434231373446452f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Capture.PNG" title="Capture.PNG" /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 03 May 2015 15:05:27 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128876#M899089</guid>
      <dc:creator>MogaRaghu</dc:creator>
      <dc:date>2015-05-03T15:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128877#M899090</link>
      <description>You still have not done any basic troubleshooting. You still have not looked at the path being created. If it's not valid, you WILL be prompted for one. Basic stuff. It's your exe on your deployed computer.</description>
      <pubDate>Sun, 03 May 2015 15:31:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3128877#M899090</guid>
      <dc:creator>Dennis_Knutson</dc:creator>
      <dc:date>2015-05-03T15:31:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129162#M899234</link>
      <description>&lt;P&gt;1.&amp;nbsp; What is in that black subVI?&amp;nbsp; You are obviously generating a path in there.&amp;nbsp; What is that path?&amp;nbsp; Is it based on the VI location?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; File I/O inside of a timed loop?&amp;nbsp; That is just asking for trouble (missed cycles, late cycles, etc.).&amp;nbsp; Wait...Windows code?&amp;nbsp; Do not even bother with the timed loop.&amp;nbsp; It does nothing but add overhead and you gain little to nothing from it.&amp;nbsp; Just use a normal While loop with a Wait ms fuction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; Since you appear to care about your timing (why else would you use a timed loop), then you really should use a &lt;A href="https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labview0.html" target="_blank" rel="noopener"&gt;Producer/Consumer&lt;/A&gt; to move your file I/O to another loop.&amp;nbsp; Further, you should not use the Write Spreadsheet File since it opens and closes the file each time it is called.&amp;nbsp; Instead, open and close the file only when you are changing files.&amp;nbsp; Write to the file with Write Text File.&amp;nbsp; If you dig into the Write To Spreadsheet File VI, you will see this being done.&amp;nbsp; Store your file reference in a shift register.&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 23:00:07 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129162#M899234</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2025-05-09T23:00:07Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129401#M899321</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/75897"&gt;@crossrulz&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;1.&amp;nbsp; What is in that black subVI?&amp;nbsp; You are obviously generating a path in there.&amp;nbsp; What is that path?&amp;nbsp; Is it based on the VI location?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp; File I/O inside of a timed loop?&amp;nbsp; That is just asking for trouble (missed cycles, late cycles, etc.).&amp;nbsp; Wait...Windows code?&amp;nbsp; Do not even bother with the timed loop.&amp;nbsp; It does nothing but add overhead and you gain little to nothing from it.&amp;nbsp; Just use a normal While loop with a Wait ms fuction.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp; Since you appear to care about your timing (why else would you use a timed loop), then you really should use a &lt;A href="https://www.ni.com/en/support/documentation/supplemental/21/producer-consumer-architecture-in-labview0.html" target="_blank" rel="noopener"&gt;Producer/Consumer&lt;/A&gt; to move your file I/O to another loop.&amp;nbsp; Further, you should not use the Write Spreadsheet File since it opens and closes the file each time it is called.&amp;nbsp; Instead, open and close the file only when you are changing files.&amp;nbsp; Write to the file with Write Text File.&amp;nbsp; If you dig into the Write To Spreadsheet File VI, you will see this being done.&amp;nbsp; Store your file reference in a shift register.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;1. The Black Sub Vi just returns the current path based on the situation - whether in Design mode or Run time system.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Current Path String.PNG" style="width: 478px;"&gt;&lt;img src="https://ip1.i.lithium.com/f34131872efb023245a01595bfaa20ce5a640419/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363636373369413437343241394330454338453642302f696d6167652d64696d656e73696f6e732f343738783231303f763d7632" width="478" height="210" role="button" title="Current Path String.PNG" alt="Current Path String.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2. File I/O inside a Timed is a true concern. But &amp;nbsp;then my acquistion rate is rather slow at once per minute. And the user needs the plot to reflect only once per hour intervals. So I thought its simpler to do what I did even if it means opening and closing the Spread Sheet file 1440 times a day. Not much ?? Anyway I do agree the overhead of the Timed Loop and have since changed to a simple while loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The producer / consumer with Queues is something that I normally use for relatively fast data grabbing say at about 50ms rate. But here again i wanted to keep it simple since its a slow process. The following one is what i have got working and it seems to hold reasonably well for the intended purpose.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 847px;"&gt;&lt;img src="https://ip1.i.lithium.com/fe35ba022a017e9b489a80ccb829f68f6a2e1952/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363636373569433641354433454143413736313641352f696d6167652d64696d656e73696f6e732f383437783331313f763d7632" width="847" height="311" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your time.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 May 2025 23:00:24 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129401#M899321</guid>
      <dc:creator>MogaRaghu</dc:creator>
      <dc:date>2025-05-09T23:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129432#M899331</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Raghunathan wrote:
&lt;P&gt;1. The Black Sub Vi just returns the current path based on the situation - whether in Design mode or Run time system.&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/e09dba4a1be3a194fb4f2e212c003e1ae2a463eb/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363636373369413437343241394330454338453642302f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Current Path String.PNG" title="Current Path String.PNG" width="478" height="210" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I would recommend throwing that VI away.&amp;nbsp; Instead, use the Application Directory function.&amp;nbsp; That functon returns the folder of the project file when in the development environment or the folder of the executable in the RTE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Raghunathan wrote:&lt;/BLOCKQUOTE&gt;
&lt;BLOCKQUOTE&gt;2. File I/O inside a Timed is a true concern. But &amp;nbsp;then my acquistion rate is rather slow at once per minute. And the user needs the plot to reflect only once per hour intervals. So I thought its simpler to do what I did even if it means opening and closing the Spread Sheet file 1440 times a day. Not much ?? Anyway I do agree the overhead of the Timed Loop and have since changed to a simple while loop. &lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A timed loop slated to loop once a minute?!&amp;nbsp; What if the user needs to abort or do some other function?&amp;nbsp; A minute is an eternity to a user.&amp;nbsp; Instead of the timed loop, use a state machine.&amp;nbsp; This way you can check for users trying to do something.&amp;nbsp; Just have a state to check how much time has elapsed.&amp;nbsp; Once your minute is up, you can take another measurement.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2015 18:00:58 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129432#M899331</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2015-05-04T18:00:58Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129665#M899427</link>
      <description>&lt;P&gt;Hi Crossrulz,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for your post. A few clarifications :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. To&amp;nbsp;call VIs dynamically, &amp;nbsp;when in Design mode I should get a path to the folder where the VIs reside. And when &amp;nbsp;in Run mode as an EXE , I must get the path to the EXE itself, &amp;nbsp;since &amp;nbsp;the VI to be called is wrapped inside it. &amp;nbsp;I have tried using the "Application Directory" function but this fails in &amp;nbsp;the EXE mode as it returns the path to the folder where the EXE resides and not the EXE itself. &amp;nbsp;This is the behaviour I have seen. So i continue to use the "Black Sub VI" that i built using this as a guide &lt;A href="http://digital.ni.com/public.nsf/allkb/FD7DE8BC8FFC256C862565F4006BE363" target="_self"&gt;HERE&lt;/A&gt;&amp;nbsp;(I always use LabVIEW 8.x file layout when building EXEs and the "Black Sub VI" resides in a folder called SUBVIS within the main App folder. )&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. My timed loop is not set for 1 minute !! Its set for 500ms and I call the Spread Sheet write function once every 120 iterations and that makes it a minute.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 02:16:40 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129665#M899427</guid>
      <dc:creator>MogaRaghu</dc:creator>
      <dc:date>2015-05-05T02:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129808#M899478</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/1040"&gt;@Dennis_Knutson&lt;/a&gt; wrote:&lt;BR /&gt;You still have not done any basic troubleshooting. You still have not looked at the path being created. If it's not valid, you WILL be prompted for one. Basic stuff. It's your exe on your deployed computer.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I am sorry I was able to do that only lately as the client was busy...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So it transpires that the file name generated from the Date / Time&amp;nbsp;stamp of the PC varies form&amp;nbsp;one PC to other.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/82917e55976d97d9578e1ce856d9a71d6dfb198e/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31363637313569343537433436453141444430343532302f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Generated Path.PNG" title="Generated Path.PNG" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On my Laptop it is : &lt;STRONG&gt;C:\Users\RaghunathanR\Desktop\UF_DataLogger\RESULTS\125-05-05-2015.txt &amp;nbsp; &lt;/STRONG&gt;( &amp;nbsp;All well )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On my client &amp;nbsp;desktop it is : &lt;STRONG&gt;F:\UF_DataLogger\APP FOLDER\Results\125-05/05/2015.txt&lt;/STRONG&gt; ( Problem is the two forward slashes)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Never imagined that it will vary like this. So I guess I will have to do some work to form the File Name myself instead of directly using the output from the FORMAT DATE / TIME STRING function.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any other ideas ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 09:47:34 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129808#M899478</guid>
      <dc:creator>MogaRaghu</dc:creator>
      <dc:date>2015-05-05T09:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129879#M899496</link>
      <description>&lt;P&gt;Use Format into String and set the format codes in whatever way you want for the time.&amp;nbsp; Format into string would allow you to eliminate about half the functions and wires you have.&amp;nbsp; Things like the backslash and hyphen would be placed into the format string rather than concatenating them into all the various parts.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically %c uses the system's format for time and is not very robust for handling all the different ways people would show time.&amp;nbsp; For instance on my system, trimming it to 10 characters leaves it at "5/5/15 7:5".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Like this:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ni.lithium.com/ni/attachments/ni/170/899496/1/Example_VI.png" border="0" alt="" title="" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 12:06:48 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129879#M899496</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2015-05-05T12:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bytestream File Refnum issue</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129882#M899497</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Raghunathan wrote:&amp;nbsp; (I always use LabVIEW 8.x file layout when building EXEs and the "Black Sub VI" resides in a folder called SUBVIS within the main App folder. )&amp;nbsp;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Stop doing that.&amp;nbsp; Especially if you are calling VIs dynamically.&amp;nbsp; By using the "new" format, you do not need to distinguish between running inside of an exe or the development environment.&amp;nbsp; The relative folders will be maintained.&lt;/P&gt;</description>
      <pubDate>Tue, 05 May 2015 12:00:50 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Bytestream-File-Refnum-issue/m-p/3129882#M899497</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2015-05-05T12:00:50Z</dc:date>
    </item>
  </channel>
</rss>

