04-24-2015
07:57 AM
- last edited on
08-20-2024
05:54 PM
by
Content Cleaner
I am trying to read a TDMS file in Matlab. I used the zip file from here: https://forums.ni.com/t5/Example-Code/Reading-TDM-TDMS-Files-with-The-MathWorks-Inc-MATLAB-Software/...
But if I try to run the example I get an error:
Error using loadlibrary (line 253)
A 'Selected' compiler was not found. You may need to run mex -setup.
Error in ReadFile (line 30)
loadlibrary(NI_TDM_DLL_Path,NI_TDM_H_Path);
If I try the procedure here:
examplePath = 'C:\test';
hfile = [examplePath '\nilibddc_m.h'];
loadlibrary([examplePath '\nilibddc'], hfile);
I get the same error
. Is it correct that I should get the file from the dev directory?
04-27-2015 07:53 AM
Might be due to different version you get the error. Obviosly the code have been working for some.
I've also seen an tool that Mathworks made
http://www.mathworks.com/matlabcentral/fileexchange/30023-tdms-reader
05-07-2015 02:51 AM
Thanks for the response. But the this tool does not seem to work also:
Error using TDMS_processLeadIn (line 50) Currently code is unable to ignore/handle Raw Daq MX data Error in TDMS_preprocessFile (line 179) [flags,info,eof_error] = TDMS_processLeadIn(fid,lastLetter); Error in TDMS_readTDMSFile (line 226) metaStruct = TDMS_preprocessFile(fid,tdmsFileName,paramsStruct); Error in TDMS_getStruct (line 57) [temp,metaStruct] = TDMS_readTDMSFile(filePath,readOptions{:});
It is not compatible, als NI did not want to release their format according to the author:
@Joe, National instruments won't release the specs for their daqmx format (I've asked), so I don't know what their binary data means. They recently updated their dll to support reading version 2 files, so you might have luck using that. I've been meaning to look at the dll but it's really low on my priority list at this point. |