LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How read just a part of a binary file?

johnsold, please find the vi to read the datas...
Message 11 of 16
(1,079 Views)
Try this. It reads the entire file and extracts one sub array in 30 seconds. If you only want to read part of the file at a time, change the number of rows to the size of the segment you wish to read. You will also need to track and update the offset if you read the file in segments

Lynn
Message 12 of 16
(1,071 Views)
I also noticed that the test file did not have the correct number of bytes to have 6 columns of SGL. Number of bytes in file: 10918336. This is not divisible by 6.

Lynn
0 Kudos
Message 13 of 16
(1,068 Views)
Johnsold.

...
For the size of the datas, I think that the data contains the header that deffine the datas...
The I'm sure that there is 6 chanels, but if I remember well, I have 6 chanels...
(I'll made an other file with a fixed number of chanels and test it to see...)

When you say that I have to "track and update the offset if you read the file in segments", How can I do that?
Reading in segment is it the same thing than reading just a part of a file???
I dont understand how you can read a part of a file without a loop....

Rrgards
0 Kudos
Message 14 of 16
(1,063 Views)
Forget the previous post, I have found how to do...

Last question : in the comments of the vi, you say that the "Number of outputs must be equal to or less than number of columns in data" : Why? It's just the number of columns that I take : it's equal to taking a columm on 5...
0 Kudos
Message 15 of 16
(1,062 Views)
The Decimate 1D array function produces no output until there are enough elements in the input array to fill each output array at least once. Try this little test VI with one, two, or three elements in array. No output. Try 9 elements. Each output array has two elements, but the ninth input element does not apppear at the output.

Lynn
Message 16 of 16
(1,042 Views)