08-12-2013 12:59 PM
In this NI example, it shows how to use asynch writes.
In #4, the buffers are preallocated at 64 samples. However, each write actually uses 128 samples (see the array size from the For Loop). Shouldn't the buffers be preallocated to 128 samples? Or should the documentation say that the "max writes" are per channel? (Doesn't seem to throw an error if you have this preallocation number off, but I would expect performance to suffer?)
C:\Program Files\National Instruments\LabVIEW 2012\examples\file\plat-tdms.llb\TDMS Advanced - Append Multiple Headers.vi
08-12-2013 09:20 PM
Yes, you are right, there is something wrong with the example:
1. The file size to reserve should be 128*8
2. The buffers of Configure Asynchronous Write should be preallocated to 128 samples.
Thanks for pointing this out and I have reported this issue to NI.
02-27-2014 01:01 PM
It appears as though this has not been fixed in LabVIEW 2013 and also occurs in other examples:
C:\Program Files\National Instruments\LabVIEW 2013\examples\File IO\TDMS\Advanced Read and Write\Asynchronous Read and Write\TDMS Advanced Append Multiple Headers.vi
C:\Program Files\National Instruments\LabVIEW 2013\examples\File IO\TDMS\Advanced Read and Write\Asynchronous Read and Write\TDMS Advanced Asynchronous Write.vi
C:\Program Files\National Instruments\LabVIEW 2013\examples\File IO\TDMS\Advanced Read and Write\Synchronous Read and Write\TDMS Advanced Synchronous Write.vi ??