Search the Community
Showing results for tags 'pre allocation and buffering + reading from index'.
Hi, I need to work with 5000*5000 arrays. Since LabVIEW (and Windows 32bit) can't handle it I had to write the arrays into a file. The operations need to be as fast as possible and thus, I turned to the advanced TDMS block that allow pre-allocation of both the buffers and the TDMS asynchronously (without creating the index file) while allowing an asynchronous read from an index inside the TDMS. However, this is the first time I am using those advance blocks and even though it seems to work, I'm not sure how optimized my code is and if all the parameters are correctly entered. For example, here are some questions: 1. Is it ok to use both asynchronous writing and buffering? 2. What should be the buffer size (wrong number corrupts the data)? 3. How long should I wait between the write and the read (asynchronous write means that I know when I sent the write request and I can't be sure if it is ready to read already)? 4. For some reason TDMS uses a lot of cpu, thus, if I don't have enough free cpu to spare the fast TDMS becomes suddenly very very slow. Am I right? 5. Did I enter the buffer and the allocation sizes correctly? 6. Can I read and write asynchronously at the same time? Should I read while writing? 7. Is there a better way to handle 5000*5000 arrays without getting out of memory? I attached two vis that demonstrate what I'm doing. The only difference between it and my actual code is that in my write I add 1 value to each channel in a loop (might be able to improve it by collecting more values and writing to the TDMS more rarely) and I take the index of that loop to my read subvi in order to read the file while writing it (which might result in a read that comes before the actual write from the buffers). Thanks in advance, DD. P.S - I'm working on a dual core machine with Win7 32 bit + LV11 write TDMS (SubVI).vi read TDMS (SubVI).vi