Dan Bookwalter N8DCJ Posted April 18 Report Share Posted April 18 OK , i am looking into using TDMS , but , i am struggling to get it to work how i envisioned. I know i am missing something , i am very tired been up for 1.5 days (travelling) ... anyway , i like the idea of the meta data aspect vs a text file... what i am looking to do is write 350-400 data points per second , for this particular test it is basically 10 rows x 35 or so columns... i have mocked up some simulated data etc... when i try to write the 10 rows , it is very slow ... if i write all 216000 rows at once after the data , it is very fast , however , this test will run 12-18 hours , so i do not want to wait until the end to write the data ... if someone could point me in the right direction that would be great. Regards Dan Quote Link to comment
infinitenothing Posted April 19 Report Share Posted April 19 Can you post your example? 300-400 points per second should be no problem at all and quite fast Quote Link to comment
hooovahh Posted April 22 Report Share Posted April 22 Several things can be done to optimize TDMS writing. TDMS has to occasionally write header data to the file to keep track of the data being written. Because of this you can add one TDMS file to the end of another and it will make a valid file. You can't for instance append an Excel file (XLSX) to the end of another and get a valid file. So you want to minimize the amount of times the header data needs to be written to disk. The easiest way to do this is to write multiple samples at once, or writing multiple channels at once. You want to avoid writing single samples. So build up N samples for your N channels and write them once the buffer is full. The buffer doesn't need to be your whole 12-18 hours. You can start small with say 10 samples and see how it performs. Quote Link to comment
eberaud Posted April 26 Report Share Posted April 26 And if possible, at each write operation write the same channels, this will prevent the creation of a new segment, as Hooovahh hinted. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.