<?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: Having problems reading a binary* file in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791309#M1069540</link>
    <description>&lt;P&gt;Sorry,&amp;nbsp; I won't be near a computer for a while, but binary files have no concept of "rows".&lt;/P&gt;</description>
    <pubDate>Thu, 10 May 2018 00:43:03 GMT</pubDate>
    <dc:creator>altenbach</dc:creator>
    <dc:date>2018-05-10T00:43:03Z</dc:date>
    <item>
      <title>Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791201#M1069499</link>
      <description>&lt;P&gt;Hello guys,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;A third party sw tool measures some parameters from a battery and outputs a file (which iam thinking is binary). The same sw tool also has the capability to convert this file to a .txt file.&lt;/P&gt;
&lt;P&gt;Iam trying to read this (binary file) to avoid having to do the conversion on the (sw tool) it self.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i&amp;nbsp;tried to follow a similar approach as this post here but no joy.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 679px;"&gt;&lt;img src="https://ip1.i.lithium.com/11878547d7506a9e250b51cbaa8b9fe952838cc7/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32323738313469373836373641334143303242363031312f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.ni.com/t5/LabVIEW/Binary-file-of-unknown-formats/td-p/512870" target="_blank"&gt;https://forums.ni.com/t5/LabVIEW/Binary-file-of-unknown-formats/td-p/512870&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;any help on this will be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kind regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 19:21:49 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791201#M1069499</guid>
      <dc:creator>El_Tipo</dc:creator>
      <dc:date>2018-05-09T19:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791207#M1069502</link>
      <description>&lt;P&gt;Hi El_Tipo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;it would help when you would attach this "binary" file instead of the already converted text file! (ZIP it…)&lt;/P&gt;
&lt;P&gt;And even better would be to also attach a description of the internal file format of this "binary file"…&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="padding-left: 30px;"&gt;&lt;FONT color="#FF0000"&gt;I tried to follow a similar approach as this post here but no joy.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;Well, that would only makes sense when your "binary file" uses a very similar encoding (aka file format) as the file in this 11 year old thread! That's why I asked for a file format description…&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 19:35:44 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791207#M1069502</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2018-05-09T19:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791240#M1069516</link>
      <description>&lt;P&gt;GerdW,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the reply.&lt;/P&gt;
&lt;P&gt;I of course failed in adding the file of interest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;attached you can find the file.&lt;/P&gt;
&lt;P&gt;the actual description i do not know it other than what the .txt file already provides.&lt;/P&gt;
&lt;P&gt;let say that the number of columns is never going to change.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 21:05:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791240#M1069516</guid>
      <dc:creator>El_Tipo</dc:creator>
      <dc:date>2018-05-09T21:05:04Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791248#M1069519</link>
      <description>&lt;P&gt;i cant send this file through here.&lt;/P&gt;
&lt;P&gt;i have tried to zip it, to send it raw, to zip it and renaming the extension from .rar to .par no joy.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://ip1.i.lithium.com/acc22fa1f1bbe484cf01f39f897cd3b34ed11512/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32323738323369313245383545443245373644413445332f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;is there any other way for me to upload this file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 21:16:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791248#M1069519</guid>
      <dc:creator>El_Tipo</dc:creator>
      <dc:date>2018-05-09T21:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791254#M1069522</link>
      <description>&lt;P&gt;Looking at your file, I see that a typical row in your table reads like:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;1	0	1	  0d 00:00:0	  0d 00:00:0	0	0	0	13.551	R	0	04/16/2018 8:41:07 AM	0.00000	0.00000	300	10	0b0110000000000001	0	65535	0	65535	0	1	21.5	13.553	0.000	0.000	1	13	13	554	4553	65535	65535	65535	1.200	16.800	0b0000000011000000	43	0b0000000000000000	3391	3385	3390	3387	0	0	0.89906	 C  	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	0.00000	
&lt;/PRE&gt;
&lt;P&gt;I don't think you can easily have LabVIEW read that as a double. What happens if you first read the entire thing in as a string?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/97520"&gt;@El_Tipo&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;i cant send this file through here.&lt;/P&gt;
&lt;P&gt;i have tried to zip it, to send it raw, to zip it and renaming the extension from .rar to .par no joy.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;img src="https://ip1.i.lithium.com/acc22fa1f1bbe484cf01f39f897cd3b34ed11512/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32323738323369313245383545443245373644413445332f696d6167652d73697a652f6c617267653f763d76322670783d393939" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;is there any other way for me to upload this file?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Could you save your binary file with a .txt extension? I don't think zipping it is actually&amp;nbsp;necessary.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 21:30:45 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791254#M1069522</guid>
      <dc:creator>ATE-EGNE</dc:creator>
      <dc:date>2018-05-09T21:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791259#M1069526</link>
      <description>&lt;P&gt;Hi Tipo,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;why has your file a 'rar' suffix when you ZIP it? Please ZIP the file!&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 21:44:51 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791259#M1069526</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2018-05-09T21:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791288#M1069533</link>
      <description>&lt;P&gt;"Binary" does not mean anything specific. Everything involving computers is binary one way or another.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Place your LabVIEW code AND the binary file in a zip file and attach it here (in windows explorer, select the files then right-click...send to... compressed folder (don't do weird things such as RAR or similar)). The forum accepts zip files just fine, independent on how you are naming the binary file inside it. The code would be interesting because&lt;U&gt; your image is very ambiguous&lt;/U&gt;. Apparently, the file is not completely binary data, because you read some of it as text so there seems to be a a header.&lt;/P&gt;
&lt;P&gt;If you add a diagram comment like "this is what I guess...", we can't even tell if your constant is SGL or DBL or even complex. Do you know it is little endian? What is the purpose of the last read operation? What's up with all these coercion dots?&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 23:22:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791288#M1069533</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2018-05-09T23:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791294#M1069536</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;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you add a diagram comment like "this is what I guess...", we can't even tell if your constant is SGL or DBL or even complex.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Agree with everything, except we know the constant is a DBL &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 23:33:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791294#M1069536</guid>
      <dc:creator>Gregory</dc:creator>
      <dc:date>2018-05-09T23:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791301#M1069538</link>
      <description>&lt;P&gt;True, if&amp;nbsp; we follow the wire all the way to the indicator, far away from the comment. &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;We still don't know if DBL is correct. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 00:00:47 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791301#M1069538</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2018-05-10T00:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791305#M1069539</link>
      <description>&lt;P&gt;okay, here is the file zipped.&lt;/P&gt;
&lt;P&gt;Altenbach,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I assumed that the file had a header that could be readable with the read txt files. i was wrong.&lt;/P&gt;
&lt;P&gt;the image that i attached was what i found to be the closest scenario on the forum to what i was trying to accomplish here. this happened to be the VI you created on that particular post (with minor changes- but wrong nonetheless)&lt;/P&gt;
&lt;P&gt;I tried to guess what was the size of the first three rows of the file (which has the information that i dont care about) and then using your approach i tried to then read the 2D array of the rest of the file, but the values are completely off.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 00:13:27 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791305#M1069539</guid>
      <dc:creator>El_Tipo</dc:creator>
      <dc:date>2018-05-10T00:13:27Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791309#M1069540</link>
      <description>&lt;P&gt;Sorry,&amp;nbsp; I won't be near a computer for a while, but binary files have no concept of "rows".&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 00:43:03 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791309#M1069540</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2018-05-10T00:43:03Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791314#M1069541</link>
      <description>&lt;P&gt;Your file is mostly XML with some fields containing binary data. I doubt that the binary data sections are "flat". They seem structured into binary sections interspersed with printable words. You probably need the documentation on the file format before proceeding.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 01:44:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791314#M1069541</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2018-05-10T01:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791325#M1069547</link>
      <description>&lt;P&gt;Altenbach,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i will try to gather this information from the developers of the sw tool.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You had mentioned that only certain fields are binary.. could you share which part is xml and which is binary?&lt;/P&gt;
&lt;P&gt;how did you arrive to this conclusion?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I only need about 10 columns of data out of the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Again thanks again for taking the time and looking into this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;kind regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 03:01:29 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791325#M1069547</guid>
      <dc:creator>El_Tipo</dc:creator>
      <dc:date>2018-05-10T03:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791344#M1069553</link>
      <description>&lt;P&gt;Just look at it in a text editor, e.g. &lt;A href="https://notepad-plus-plus.org/" target="_blank"&gt;notepad++&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 04:47:56 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791344#M1069553</guid>
      <dc:creator>altenbach</dc:creator>
      <dc:date>2018-05-10T04:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: Having problems reading a binary* file</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791447#M1069581</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://ni.lithium.com/t5/user/viewprofilepage/user-id/97520"&gt;@El_Tipo&lt;/a&gt;
&lt;P&gt;I only need about 10 columns of data out of the file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Just wanted to point out that this is the wrong way to go about it. It is going to be much faster for you to bring the entire thing into LabVIEW and then eliminate what you don't need. I agree that the data is in XML (a format commonly used to flatten data into strings) LabVIEW &lt;A href="http://zone.ni.com/reference/en-XX/help/371361P-01/glang/dom_parser_vis/" target="_self"&gt;has a few functions &lt;/A&gt;that are designed for XML.&lt;/P&gt;</description>
      <pubDate>Thu, 10 May 2018 12:23:57 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Having-problems-reading-a-binary-file/m-p/3791447#M1069581</guid>
      <dc:creator>ATE-EGNE</dc:creator>
      <dc:date>2018-05-10T12:23:57Z</dc:date>
    </item>
  </channel>
</rss>

