Rank: 321296 based on 0 downloads (last 30 days) and 0 file submitted
photo

Juha Suomalainen

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Juha
Updated File Comments Rating
08 Jun 2011 TDMS Reader Read TDMS files v1 & v2 without DLL Current Version: 2.5 Author: Jim Hokanson

Hi,
Great code you have here but I think there is still a bug somewhere inside it. I am able to load my whole TDMS file using you function. That works fine. Unfortunately some of my datasets will be huge and due to memory issues must be loaded and processed in parts. If I try to read a subset of data using your function, I get an error.

Here is my code to read and process data group by group:
---
% Get list what is inside the TDMS
params = {'GET_DATA_OPTION','getnone'};
TDMS_Structure = TDMS_readTDMSFile(TDMS_File, params{:});
% Read and process groups from the TDMS file one by one
for GroupNumber = 1:numel(TDMS_Structure.groupNames)
params = {...
'GET_DATA_OPTION', 'getSubset',...
'OBJECTS_GET', struct('groupsKeep',{{TDMS_Structure.groupNames{GroupNumber}}})};
TempData = TDMS_readTDMSFile(TDMS_File, params{:});
% process subset of data here
ProcessData(TempData)
end
---

I can read the TDMS_Structure without problems, but the subset loading call of 'TDMS_readTDMSFile' produces an error:

---
??? Error using ==> TDMS_readFileHelper_v1 at 211
The # of requested values does not equal the # of returned values, error in code likely

Error in ==> TDMS_readTDMSFile at 229
data = TDMS_readFileHelper_v1(fid,optionStruct,metaStruct,paramsStruct);
---

Is it a bug or am I just using your code with wrong parameters?

Contact us