03-29-2011 06:33 PM
I'm having trouble parsing a binary file correctly. I'm using the Labview example 'Read Binary File' I've attached to open the file. I suspect that I'm using the incorrect parameters on the 'read from binary file' command.
Here is a little background on my application. The binary file I'm trying to read has data stored as 16-bit and 32-bit unsigned integers. The data comes in chunks of 18 bytes; within this 18 byte chunk are five 16 bit values and two 32 bit values. In the end I'm only concerned with pulling one of the 16 bit values from each data chunk, so its fine if the sorting method interprets the 32 bit values as two consecutive 16 bit values.
Any suggestions on how to parse the binary file correctly? Thanks for any suggestions!
P.S. I've attached an example of the binary file I'm trying to parse. It didn't have an extension so I chagned it to .txt for uploading. It has 40k+ events, and a 18 byte data chunk is recorded for each 'event', so the binary is fairly long.
Solved! Go to Solution.
03-29-2011 07:03 PM
You can either read the file as all bytes and do some Unflatten gymnastics, or specify the datatype for Read from Binary file. No need to feed it the size, just let it read all of the file at once. Lovely how the snippet crops the cluster constant.
07-03-2014 04:19 AM
Hi,
I wonder if you could help me on this simple issue.
I am quering a Scope with 10k Samples, and expecting to get out 10k Samples on the GUI.
I am using the Example ReadBinaryData.vi and modified it a bit to read out the Data from the Scope.
The Binary File indeed starts with#6100000 but I alwasy getting the ArraySize of 5000, why?
Thanks for the info
Y3G
07-03-2014 04:34 AM
07-03-2014 09:37 AM