LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The fastest way of acquiring data?

If you want to be able to grab arbitrary pieces out of your file, I would recommend looking at one of the structured file formats - TDMS or HDF5.  The benchmarks I have seen show them to be about the same speed for this use case.  TDMS is a lot easier to use than HDF5.  HDF5 is more flexible and better supported outside of NI products.
0 Kudos
Message 21 of 24
(919 Views)

But I need the BEST speed for writing... I have to try binary first and, if there's no way of really reading it faster, I can leave it and go to an other format...

 

Using 'for's to generate array from the signals I have and a "case" to split them in 2 worked, but it took so much time to do it that I won't be able to use it with 8 channels and 2.5MHz... Isn't there any other better way for spliting the data in two? (it's coming from a binary file, where each signal' sample is intercaladed with the others, meaning Sample1ch1, Sample1ch2, Sample2ch1, Sample2ch2, Sample3ch1, Sample3ch2)

Message Edited by Danigno on 11-14-2008 08:00 AM
0 Kudos
Message 22 of 24
(919 Views)

Is your bottleneck reading or writing?  The way your were writing is about as fast as it gets, and is certainly expandable to 8 channels at 2.5GHz, subject to the constraints I mentioned earlier.  You also need to save data to disk in ~65,000 byte blocks for fastest speed.  Getting away from this value can have huge consequences for speed, especially if you use smaller chunks.  This is also the chunk size you want to use for reading.  If you have LabVIEW 8.6 or better, you can also try the unbuffered mode in Windows, which may give you even more speed, but watch your chunk sizes.

 

The general method for reading a subset of your data would be:

  1. Preallocate your final data using Initialize Array.
  2. Determine the starting point of your data in the file (usually this will be the head plus any header info you have).  Make sure you start at the beginning of a block of data since your data is interleaved.
  3. In a loop, with your final data in a shift register, loop on pulling ~65,000 byte chunks from the file with the proper dimensionality for your data (a 2D array).
  4. For each chunk, use the Array Subset primitive to extract the channel you want and Replace Array Subset to put it into the proper place in your final data.
  5. Loop until you have all the data you need
Post your attempts and we can critique them for you.
0 Kudos
Message 23 of 24
(889 Views)

DFGray,

 

I just posted in this other related post what I've tried (it's still not working).. If you could take a look there so I don't need to post it again...

 

Thanks

0 Kudos
Message 24 of 24
(884 Views)