Hello, I am new to reading binary files and have had a lot of help creating this simple read binary vi. There is header information (# of channels, sampling rate etc) on the sample files\ which no matter what I do, I cannot read it. I would really appreciate any help with this!!
You are connecting the control "Length of heather data" to the offset input of the read file vi. By doing that you are reading only the values after that byte you connect there. I think your header are the first 22 bytes of the file, so if you connect 0 to that input, you'll get also those first 22 bytes and then you have to remove them from the array.
I actually have another question related to the same vi. Is it possible to automaically calculate the number of samples in a channel. I have varying collected time durations from file to file and just to be safe I always read in a fixed number of samples. This sometimes oversamples and if I change the sample rate, may under sample. I now have reference of the number of channels and sample frequency from the header of each file. Is this possible??
This thread has helped me out tremendously as I am encountering a similar issue. I am trying to read a binary file that contains very similar data (an EDF file if anyone is familiar) as Gorelick has described, but my files are very large (>150 MB). How can I modify this vi so that I only read so many data points from my binary file (after pulling the header) then when I perform some action such as a button click I will load up the next set of values. Originally I was using a MATLAB toolkit to read my file, but it would read the entire file at once an absolutely kill the machine in terms of memory usage, so I need to move away from this. I really appreciate any help here, this is for a design project, so that I can graduate and I've had to pretty much teach myself LabVIEW from scratch. If anyone is curious I am using LabVIEW 7.1.