<?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: Read data from Log files in LabWindows/CVI</title>
    <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330418#M74009</link>
    <description>&lt;P&gt;If it is a simple structure I would assume that your approach is fine: read one line, e.g. using ReadLine, and then scan this line using scanning functions such as sscanf or Scan to extract its contents&lt;/P&gt;</description>
    <pubDate>Wed, 03 Aug 2016 08:16:14 GMT</pubDate>
    <dc:creator>Wolfgang</dc:creator>
    <dc:date>2016-08-03T08:16:14Z</dc:date>
    <item>
      <title>Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330022#M73995</link>
      <description>&lt;P&gt;Hi, I'm trying to read data from some log files line by line, but the Line buffer is never enough even if I put 1000000, who might&amp;nbsp;know the solution &lt;IMG src="https://ip1.i.lithium.com/48acf185bec1260e2a842125fb816c570c4ec231/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31383731313169333436394235333042313432324534312f696d6167652d73697a652f6f726967696e616c3f763d76322670783d2d31" border="0" alt="fatal.PNG" title="fatal.PNG" /&gt;?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 10:50:30 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330022#M73995</guid>
      <dc:creator>Kalid92</dc:creator>
      <dc:date>2016-08-02T10:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330077#M73998</link>
      <description>&lt;P&gt;Your first parameter of ReadLine seems to be wrong, it should be the file handle obtained by calling OpenFile, not a constant...&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 13:36:16 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330077#M73998</guid>
      <dc:creator>Wolfgang</dc:creator>
      <dc:date>2016-08-02T13:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330287#M74004</link>
      <description>&lt;P&gt;Yes ! I rectified that!&lt;/P&gt;&lt;P&gt;if(GetFirstFile (PathBuffer, 1, 1, 0, 0, 0, 0, fileName) == 0);&lt;/P&gt;&lt;P&gt;if(GetNextFile (fileName) == 0)&lt;BR /&gt;{ n = GetFileInfo(fileName,&amp;amp;size);&lt;BR /&gt;if (n == 0)&lt;BR /&gt;FmtOut("File does not exist.");&lt;BR /&gt;else&lt;BR /&gt;FmtOut("File size = %i[b0]",size);&lt;BR /&gt;&lt;BR /&gt;if (FileHandle = OpenFile (fileName, VAL_READ_ONLY, VAL_OPEN_AS_IS, VAL_ASCII))&lt;BR /&gt;{&lt;BR /&gt;SetCtrlVal (panelHandle3, PANEL3_FILESUCCESS, "fichier ouvert");&lt;BR /&gt;ReadFile (FileHandle, LineBuffer, 10000);&lt;BR /&gt;SetCtrlVal (panelHandle3, PANEL3_FILESUCCESS, LineBuffer);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;CloseFile(FileHandle);&lt;BR /&gt;//InsertListItem (panelHandle3, PANEL3_LISTBOX, -1, fileName, 0);&lt;BR /&gt;}&lt;BR /&gt;else&lt;BR /&gt;MessagePopup("error","file not found !");&lt;/P&gt;&lt;P&gt;******************************************************************************&lt;/P&gt;&lt;P&gt;Now Size ==0 and LineBuffer is showing 5 random caracters !!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 21:17:31 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330287#M74004</guid>
      <dc:creator>Kalid92</dc:creator>
      <dc:date>2016-08-02T21:17:31Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330372#M74005</link>
      <description>&lt;P&gt;I do not know your file contents (e.g., the first two lines of your log file could be useful) nor your PathBuffer so I only can guess. For example, I do not understand the purpose of your first line&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000FF"&gt;if(GetFirstFile (PathBuffer, 1, 1, 0, 0, 0, 0, fileName) == 0);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Shouldn't there be a '{' instead of your ';' ?&lt;/P&gt;&lt;P&gt;In any case, what you could/should do is set breakpoints to verify that your code is doing what you expect it to do; e.g., did you verify that fileName is what you expect it to be?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 06:15:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330372#M74005</guid>
      <dc:creator>Wolfgang</dc:creator>
      <dc:date>2016-08-03T06:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330385#M74006</link>
      <description>&lt;P&gt;you're right I didn't give you much informations. It doesn't matter, all the files have data in them, I can see the fileName I am already using breakpoints, but what I am doubting of is what if .log files have specific libraries like .ini files ??&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 07:18:01 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330385#M74006</guid>
      <dc:creator>Kalid92</dc:creator>
      <dc:date>2016-08-03T07:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330397#M74007</link>
      <description>&lt;P&gt;ReadLine doesn't care about file contents, it is just interested in a linefeed character &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;&lt;P&gt;However, if you are using ini files you might want to have a look at the toolslib library &lt;A href="http://zone.ni.com/reference/en-XX/help/370051V-01/toolslib/toolslibreadingwriting_inistyle_files_co/" target="_self"&gt;inifile.fp&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 07:37:20 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330397#M74007</guid>
      <dc:creator>Wolfgang</dc:creator>
      <dc:date>2016-08-03T07:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330411#M74008</link>
      <description>&lt;P&gt;Yes I already worked with .ini files, so&amp;nbsp;do you have an idea&amp;nbsp;of the best way to read .log files ??&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 07:59:40 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330411#M74008</guid>
      <dc:creator>Kalid92</dc:creator>
      <dc:date>2016-08-03T07:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330418#M74009</link>
      <description>&lt;P&gt;If it is a simple structure I would assume that your approach is fine: read one line, e.g. using ReadLine, and then scan this line using scanning functions such as sscanf or Scan to extract its contents&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 08:16:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330418#M74009</guid>
      <dc:creator>Wolfgang</dc:creator>
      <dc:date>2016-08-03T08:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Log files</title>
      <link>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330422#M74010</link>
      <description>&lt;P&gt;Ok thank you, I will try that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 08:34:50 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabWindows-CVI/Read-data-from-Log-files/m-p/3330422#M74010</guid>
      <dc:creator>Kalid92</dc:creator>
      <dc:date>2016-08-03T08:34:50Z</dc:date>
    </item>
  </channel>
</rss>

