07-18-2016 10:01 AM
I have a binary data file which is saved as microsoft update file and I need to extract the data information and show it in labview along with the waveform graph. The resulted waveform in labview is in time domain with the acquired data. Can someone tell me how can I approach it?
07-18-2016 10:05 AM - edited 07-18-2016 10:07 AM
No need to make a paragraph title.
The file is a data file, but is a microsoft data file format? Can you share this file? Why is your data in the MSU format?
Maybe you could use the ActiveX framework to use Microsoft API to read the file, but I haven't seen this done before.
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
07-18-2016 10:18 AM - edited 07-18-2016 10:19 AM
LabVIEW can read any file if it has read permissions. In the end, everything is just bits. 😄
Windows explorer labels the file according to the file extension and corresponding registry entry, but a given file extension does not necessarily make it that kind of file. Just ingore that label. (Similarly, If you change the name of an empty text file to "*.exe, it is still not an executable!).
What program generated the file? Do you know the structure of the binary file (datatypes, little/big endian, headers, arrangements, etc.)? How do you know it is binary?
07-18-2016 11:38 AM
Tell us more about the file. How was it created? What program/utility made the file? Do you have any idea of what should be in the file? Can you attach a "sample" file?
As others have already explained, files are simply collections of bits. For example, text files write all of the data as Ascii strings, so they are immediately "human-readable" using any Text editor (such as Notepad). Binary files, on the other hand, generally are structured as the data are saved in memory. So if you wrote out an I32 followed by a Dbl, you could expect 4 bytes that represented an Integer (so the number 1 would be, in hex, 0000000000000001), while the Dbl would be 8 bytes with the first few representing a (binary) exponent while the remaining represent a (I believe 51-bit) approximation of the data. Structured data (e.g. Arrays) also (can) have information saved in the binary file (including the Array size).
Knowing the structure of the file, it is fairly easy to read the data into LabVIEW (you just need to "know" what the data are and read into the appropriate LabVIEW Variable, i.e. read an I32, then a Dbl, then a String, then a Boolean, or whatever format the data were written). If you know the format, you are 90% of the way there. If you don't, but have a "good idea", then by analyzing the Binary File, you may be able to deduce the correct format.
If you provide more information/data, we can provide more help.
Bob Schor
07-18-2016 12:09 PM
So the data is captured from the oscilloscope and it is stored as binary because it is in endian form.
07-18-2016 12:14 PM
Are you sure it's not a proprietary file with the same extension as MSU file so it appears like an MSU file in Windows explorer?
07-19-2016 12:59 AM - edited 07-19-2016 01:00 AM
@studentgirl wrote:So the data is captured from the oscilloscope and it is stored as binary because it is in endian form.
The term "endian" is not a format, just a byte order. Everything is "endian" the question is if it is little-endian or big-endian. Even if we know that, we are not much closer to a solution. It does not tell us anything about the datatypes.
07-19-2016 07:41 AM
OK, so we know it is data from an oscilloscope (so probably a 1D or 2D array, probably floats, possibly with additional values for time base, gain settings, etc). Who makes the oscilloscope (maybe we can learn about the binary format)? Can you attach a sample file for us to inspect? How do you expect us to help you if you are so stingy with information?
Bob Schor
07-19-2016 09:35 AM
I am sorry for being so stingy but this is my first time using formus and labview. I am not able to upload the file because of msu extension. But an app needs to be created in labview to read that file. So any suggestions will help me. I know I am not providing enough info since its my first time using Labview.
Thanks to all for your time.
07-19-2016 09:36 AM
Put your file inside a zip file and upload that.