11-02-2007 11:38 AM
dllpath=
'C:\Program Files\Matlab\R2007a\toolbox\TDMS\dev\bin\nilibddc'hpath=
'C:\Program Files\Matlab\R2007a\toolbox\TDMS\dev\include\nilibddc.h'loadlibrary(dllpath,hpath);
pfile = libpointer(
'int32Ptr', 0);result=calllib(
'nilibddc','DDC_CreateFile','C:\temp\test.tdm','TDM','test file','test file', 'test title','author',pfile)if
result==-6212result=calllib(
'nilibddc','DDC_OpenFileEx', 'C:\temp\test.tdm', 'TDM', 1, pfile)end
pgroup=libpointer(
'int32Ptr', 0);calllib(
'nilibddc','DDC_AddChannelGroup',pfile.Value,'Model3','PLS Model for M345V in Mobile',pgroup)calllib(
'nilibddc','DDC_SaveFile',pfile.Value);calllib(
'nilibddc','DDC_CloseFile',pfile.Value);unloadlibrary(
'nilibddc');DDC_InvalidFileHandle = -6206
Error.
Once I save the files I also can't open them.
Any suggestions?
11-02-2007 12:18 PM
11-02-2007 03:12 PM
>> This is the LabVIEW forum. Are you trying to call matlab functions using LV?
I am trying to save a file in Matlab and read it from LabView. TDM or TDMS files have the right structure so it would be nice to use them.
Maybe there is someone in the comunity, who also worked with MATLAB and had a similar problem.
11-02-2007 08:30 PM
11-05-2007 11:50 AM
11-05-2007 02:06 PM
IstDerHolger wrote:
I am trying to write a TDM or TDMS File in Matlab.
11-08-2007 02:31 PM
11-08-2007 02:49 PM
12-04-2007 03:42 PM
result=calllib('nilibddc','DDC_OpenFileEx', 'C:\temp\test.tdm', 'TDM', 1, pfile)
It is my understanding that this will open the file in read only mode. If you want to write and save the file, you should pass 0 for the 5th parameter.06-06-2008 10:53 AM