01-05-2014 07:44 AM
Hi all,
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.
Many thanks.
Jack
01-05-2014 11:59 AM
01-05-2014 01:20 PM
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?
01-05-2014 03:10 PM
01-05-2014 09:05 PM
Hi,
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.
01-05-2014 09:24 PM
01-06-2014 08:04 AM
Hi deepSU,
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,
Thanks,
Jack
01-06-2014 08:06 PM
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.
01-06-2014 09:07 PM
Hi deppSu,
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?
Thanks,
Jack
01-07-2014 07:47 AM
Hi all,
Could someone please help with this? Getting desparate....
Thanks,
Jack