<?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: Won'r Create File Before While Loop in LabVIEW</title>
    <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809742#M1075813</link>
    <description>&lt;P&gt;Is this running on an RT system?&lt;/P&gt;</description>
    <pubDate>Tue, 26 Jun 2018 14:56:16 GMT</pubDate>
    <dc:creator>crossrulz</dc:creator>
    <dc:date>2018-06-26T14:56:16Z</dc:date>
    <item>
      <title>Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809711#M1075803</link>
      <description>&lt;P&gt;I have a .vi that is collecting analog signals inside a while loop. I am using the producer/consumer (data) template to write the analog data to a file. I am using the Open/Create/Replace file function to open a file then write to it then close it. I currently have the open/create/replace function outside the while loop, the write to file inside the while loop, and the close file outside the while loop.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is my issue: when I run the program there is no dialog box to select the file path. It immediately gives error 43 (on and indicator) which says I cancelled the dialogue box. I didn't even see a dialog box. I have no input to the "file path" input to the create file function. It's almost like the dialog box opens and closes before I even see it. How can I fix this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot upload or download my .vi right now but any help is greatly appreciated!&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 14:30:04 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809711#M1075803</guid>
      <dc:creator>MikeIsMyName</dc:creator>
      <dc:date>2018-06-26T14:30:04Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809742#M1075813</link>
      <description>&lt;P&gt;Is this running on an RT system?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 14:56:16 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809742#M1075813</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2018-06-26T14:56:16Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809754#M1075817</link>
      <description>&lt;P&gt;No it is not.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 15:07:50 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809754#M1075817</guid>
      <dc:creator>MikeIsMyName</dc:creator>
      <dc:date>2018-06-26T15:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809781#M1075823</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/606344"&gt;@MikeIsMyName&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I cannot upload or download my .vi right now but any help is greatly appreciated!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;UL&gt;
&lt;LI&gt;What are the exact values of all inputs wired to the file open function?&lt;/LI&gt;
&lt;LI&gt;Does it work any differently if you open inside the while loop or is that part of your post irrelevant?&lt;/LI&gt;
&lt;LI&gt;What happens if you use an &lt;A href="http://zone.ni.com/reference/en-XX/help/371361M-01/glang/file_dialog/" target="_blank"&gt;explicit file dialog&lt;/A&gt; before opening the file?&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 26 Jun 2018 15:51:15 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809781#M1075823</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2018-06-26T15:51:15Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809886#M1075861</link>
      <description>&lt;P&gt;The file is attached. It shows the producer/consumer loop and the create file function leading to the consumer loop. When the program is ran it just simply starts streaming the data to the charts on the front panel without asking where to create the file. The error code is 43 saying the user closed the dialog box even though it never shows up.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 20:04:13 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809886#M1075861</guid>
      <dc:creator>MikeIsMyName</dc:creator>
      <dc:date>2018-06-26T20:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809893#M1075863</link>
      <description>&lt;P&gt;Hi Mike,&lt;/P&gt;
&lt;P&gt;The dialog popped up for me ok.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, this is the same problem of writing to a file from your other thread, please keep all discussion in the same place so we don't duplicate each other's efforts to answer your question.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.ni.com/t5/LabVIEW/Exporting-Data-to-Excel-From-While-Loop/m-p/3809205#M1075638" target="_self"&gt;https://forums.ni.com/t5/LabVIEW/Exporting-Data-to-Excel-From-While-Loop/m-p/3809205#M1075638&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 20:31:07 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809893#M1075863</guid>
      <dc:creator>Gregory</dc:creator>
      <dc:date>2018-06-26T20:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809914#M1075870</link>
      <description>&lt;P&gt;What would be the reason for it to pop up for you but not for me? Is it where I saved the .vi or the project to? Should I save it to a different folder? I also run labview as administrator everytime. Hmmmm.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jun 2018 21:35:17 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809914#M1075870</guid>
      <dc:creator>MikeIsMyName</dc:creator>
      <dc:date>2018-06-26T21:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809966#M1075880</link>
      <description>&lt;P&gt;Without the sub vi I can merely guess what may be happening. (Oh, but my 8-Ball is magical!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You probably get a default value out of Refresh rate that is zero.&amp;nbsp; (That combo box shou;ld be a ring!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This leaves the top loop greedy and the ui thread swamped by the chart refreshes and the plot color property nodes (Consider using a value change event to set the plot colors in a separate loop)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So there is really no time to toss up the dialog box that needs an idle ui thread to pop-up.&amp;nbsp; When you press stop The other stop or get an error you immediately destroy the queue signaling the logging loop is ready to exit.&amp;nbsp; Then the dialog box should appear... unless you hit the abort button to stop the vi (quit doing that!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, Time stamps are incremented by seconds so to convert to excel time you &lt;STRONG&gt;multiply&lt;/STRONG&gt;&amp;nbsp;by 86400 sec / day and then add the number days between&amp;nbsp;dec 31 1899&amp;nbsp;and&amp;nbsp; Jan 1 1904 (1461) and then add 1 more for the bug in Excel that forgot 1900 was not a leap year.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 00:50:42 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809966#M1075880</guid>
      <dc:creator>JÞB</dc:creator>
      <dc:date>2018-06-27T00:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: Won't Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809982#M1075886</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/123634"&gt;@JÞB&lt;/a&gt;&amp;nbsp;wrote: &lt;BR /&gt;
&lt;P&gt;Also, Time stamps are incremented by seconds so to convert to excel time you &lt;STRONG&gt;multiply&lt;/STRONG&gt;&amp;nbsp;by 86400 sec / day and then add the number days between&amp;nbsp;dec 31 1899&amp;nbsp;and&amp;nbsp; Jan 1 1904 (1461) and then add 1 more for the bug in Excel that forgot 1900 was not a leap year.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I think you also need to add or subtract the number of seconds based on your timezone offset.&amp;nbsp; So for EST (UTC -5), you'd have to account for 5 hours worth of seconds (5x3600) since LabVIEW times are based on UTC and Excel bases them on your current timezone.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 02:33:32 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809982#M1075886</guid>
      <dc:creator>RavensFan</dc:creator>
      <dc:date>2018-06-27T02:33:32Z</dc:date>
    </item>
    <item>
      <title>Re: Won't Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3810124#M1075931</link>
      <description>&lt;P&gt;You guys have been extremely helpful and I appreciate that! I believe I found the issue but the fix is still eluding me. Here it is:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The 5 analog signals coming in are coming from a myRIO. I believe the .vi I have written is trying to create the file to the myRIO instead of to my computer. Now, for a producer/consumer structure, can I create the consumer loop in a seperate vi that will know to save to computer? I would place this vi under the "My Computer" cluster in the project viewer&amp;nbsp; instead of the vi that is on the myRIO. Is this possible? Can I run the queue between two vi's?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 11:49:25 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3810124#M1075931</guid>
      <dc:creator>MikeIsMyName</dc:creator>
      <dc:date>2018-06-27T11:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Won't Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3810137#M1075939</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/606344"&gt;@MikeIsMyName&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I would place this vi under the "My Computer" cluster in the project viewer&amp;nbsp; instead of the vi that is on the myRIO. Is this possible? Can I run the queue between two vi's?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;So I was correct with my &lt;A href="https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3809742#M1075813" target="_blank"&gt;initial guess&lt;/A&gt;!&amp;nbsp; You have to treat the myRIO like it is a separate computer, because it is.&amp;nbsp; NI does a great job abstracting this concept away, but it bites us constantly when File IO is encountered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What you need to do is make an application on your PC that just gets data from the myRIO.&amp;nbsp; How to get the data?&amp;nbsp; I use the STM library to communicate over TCP/IP.&amp;nbsp; Many around here really like Network Streams.&amp;nbsp; Either way, you need to have your myRIO connect to an application on your PC and use that connection to send the data.&amp;nbsp; The PC application can then log the data to wherever you want.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 12:21:42 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3810137#M1075939</guid>
      <dc:creator>crossrulz</dc:creator>
      <dc:date>2018-06-27T12:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Won'r Create File Before While Loop</title>
      <link>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3810257#M1075970</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.ni.com/t5/user/viewprofilepage/user-id/75897"&gt;@crossrulz&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Is this running on an RT system?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;A magic 4-ball!&amp;nbsp; &amp;nbsp;problem identified but no ...... real (or complex) answer. Smiley something&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jun 2018 15:24:21 GMT</pubDate>
      <guid>https://forums.ni.com/t5/LabVIEW/Won-r-Create-File-Before-While-Loop/m-p/3810257#M1075970</guid>
      <dc:creator>JÞB</dc:creator>
      <dc:date>2018-06-27T15:24:21Z</dc:date>
    </item>
  </channel>
</rss>

