LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TDMS reader does not work with the New Matlab R2007b verson


Meghan M wrote:

The compatibility issue between The MathWorks, Inc. MATLAB(R) software version R2007b and National Instruments software is due to the TDM-C DLL.  We are currently working on updating the TDMS reader, and other parts of LabVIEW to work with this version of The MathWorks, Inc. MATLAB(R) software.

What are the error messages that you are receiving with The MathWorks, Inc. MATLAB(R) software version R2007a?  Also, how are they related to the functions that you have listed? 


Hi Meghan, it's great to hear that you are working on updating the software.
 
Here is an example of the kind of error I am getting in MATLAB when I call my code:
 
Data file loaded!
Root has 10 properties:
Checked all 5 cache memory tables. Found no corrupted tables.
The file contains 2 channel groups
Group has 2 properties:
Group 1 has 2 Channels
------------------------------------------------------------------------
       Segmentation violation detected at Mon Mar 03 16:50:00 2008
------------------------------------------------------------------------
Configuration:
  MATLAB Version:   7.4.0.287 (R2007a)
[...deleted...]
Error in ==> tdmsChnProps at 14
[ status, ChnPropNames ] = calllib( 'nilibddc', 'DDC_GetChannelPropertyNames', hChn, emptycell, pNumChnProps.Value );
Error in ==> tdmsChnProps at 87

These errors occur intermittently, but quite frequently, and are always triggered by calls to the functions that retrieve the list of property names.
 
Here's an example code snippet including the offending line:
 
emptycell = repmat( {''}, double(pNumChnProps.Value), 1 );

[ status, ChnPropNames ] = calllib( 'nilibddc', 'DDC_GetChannelPropertyNames', hChn, emptycell, pNumChnProps.Value );

In this example, hChn is a value returned by DDC_GetChannels.
 
I hope this provide enough clues!!!
 
Thanks,
 
Alex
 
The views expressed in this post are those of the originator and do not necessarily represent the views of NPL Management Ltd. Nothing in this post shall bind NPL Management Ltd in any contract or obligation.
The views expressed in this site are those of the originator and do not necessarily represent the views of NPL Management Ltd. Nothing in this post shall bind NPL Management Ltd in any contract or obligation.
0 Kudos
Message 11 of 21
(2,312 Views)
Hi Alex,
 
Thank you for submitting this.  The error that you are seeing when using the function "DDC_GetChannelPropertyNames" is something our R&D team is aware of.  They are currently working on resolving this issue for future versions.  In the meantime, I was suggest trying to avoid use of this function, especially if you already know the channel property names.  I apologize for this inconvenience, but please let me know if there is anything I can do to help you avoid this error.  Thanks Alex.
0 Kudos
Message 12 of 21
(2,295 Views)


Meghan M wrote:
Hi Alex,
 
Thank you for submitting this.  The error that you are seeing when using the function "DDC_GetChannelPropertyNames" is something our R&D team is aware of.  They are currently working on resolving this issue for future versions.  In the meantime, I was suggest trying to avoid use of this function, especially if you already know the channel property names.  I apologize for this inconvenience, but please let me know if there is anything I can do to help you avoid this error.  Thanks Alex.


Meghan,
 
thanks for the clarification! I will look at work-arounds. I was trying to make something that was completely generic, but I guess the work-around is to test for known properties using DDC_FilePropertyExists and the equivalent functions for groups and channels. Alternatively, I am looking into the Math Interface Toolbox so I can code my own VI to move the data into MATLAB.
 
Thanks again,
 
Alex
 
The views expressed in this post are those of the originator and do not necessarily represent the views of NPL Management Ltd. Nothing in this post shall bind NPL Management Ltd in any contract or obligation.
The views expressed in this site are those of the originator and do not necessarily represent the views of NPL Management Ltd. Nothing in this post shall bind NPL Management Ltd in any contract or obligation.
0 Kudos
Message 13 of 21
(2,283 Views)
No problem Alex.  Best of luck with your application!
Message 14 of 21
(2,267 Views)

Hi Meghan,

 

It looks like the last thread was 1 year ago today. I'm having the same problem (Error using ==> loaddefinedlibrary. The specified module could not be found.), and would like to know if it was ever resolved. I've tried it on 2 PC's running XP w/IE6 and IE7, and Matlab version r2006a and r2007a with no success. This is critical to my application, so would appreciate any help. 

0 Kudos
Message 15 of 21
(2,047 Views)

HI BK,

 

Did you get the example from here. This kb was updated in May 2008, to contain the fix for this problem.

Regards,
Claire Reid
National Instruments
Message 16 of 21
(2,004 Views)
I tested the fix using Matlab R2006a and  R2007a with IE7. I downloaded the example again today to make sure it is the most current version, but I still have the same problem. Do you think it is related to IE7?
0 Kudos
Message 17 of 21
(1,994 Views)

Hey BK,

 

It is possible. But I am not positive. I will test this on our test machine and let you know.

Regards,
Claire Reid
National Instruments
0 Kudos
Message 18 of 21
(1,962 Views)

Hi Claire,

 

I discovered something today that may help resolve this problem:  In the kb, it is suggested that the paths to the dll and h-file are

defined in the Matlab m-file as follows:

examplePath = 'C:\test';
hfile = [examplePath '\nilibddc_m.h'];

loadlibrary([examplePath '\nilibddc'], hfile);

 

When this is done, the user is not prompted for the paths to the dll and h-file, and the error occurs. However, if these lines are deleted, allowing the script to prompt for the files, then the program works. This would indicate the problem is not with the dll itself, but something in the way the paths are defined. I know that the files were found when the paths were predefined, as I would get a "file not found" error if the path or filename were wrong. I will continue to look at this - maybe you could try this experiment and see what you think.

0 Kudos
Message 19 of 21
(1,942 Views)

Claire,

 

It seems I should have read the README file in the download. It states:

The 'dev\bin' directory contains all of the run-time components required by
this library. For the purpose of development testing, you should copy the  
contents of this directory into the same directory as the executable or DLL
that uses this library.  

So, if I copy all the files from dev/bin to the directory where I put the dll and h-file,

all seems to be working properly.  The 1st page of the kb seemed to imply that

only the dll and h-file needed to be in this directory, but that is not the case.                                              

 

 

0 Kudos
Message 20 of 21
(1,929 Views)