I am having some major problems reading in all channels from a tdms file in chunks (to reduce memory load). The code below reads all channels, but does not loop to build an array. Only the first iteration of the while loop is read.... Any suggestions greatly appreciated.
Maybe a little more info would be helpful.
Does the loop stop after the first iteration, or is it still running, but not reading anything?
Are you getting any errors at the end of the run?
According to the doc of TDMS Read,
"If you do not wire data to this input, LabVIEW reads data from the first group when you run this function for the first time. If you run this function continuously for multiple cycles without wiring the group name in input, LabVIEW reads data from the nth group at the nth cycle. "
In your case, even you have "offset" and "count" wired, TDMS Read reads data for the next group in your loop instead of next chunk of your current group. My advice is that you can use TDMS List Contents to get all the groups and channels, then read all channels one by one and chunk by chunk.
Please see the attached... I assume I have inserted the "List Contents" vi into the correct location...
Still not worrying as needed? Each chunk loads as a different channels and arrays do not append,
I don't think you can get the "NI_ChannelLength" from a TDMS group instead of a Channel. Except for that, your VI looks O.K. to me.
One thing to notify is that the chunk you set means samples not bytes. And you can observe your tdms file by TDMS Viewer to see the actual length of your channels.
My question How many iterations does your loop run? If it's possible you can upload your TDMS file and we can see if your VI works.
See attached vi... This now reads all data in chunks BUT each chunk does not concatenate as required? Each chunk is stored in a new row.
Surely this is a simple fix?
The tdms file (and index) will not attach as I get a "The file does not have a valid extension for an attachment" error on upload?