TDM C DLL读取tdms文件出现问题

     下载了tdm c dll 并且用C++读取tdms文件,在执行的时候一直出现Error:The file passed to the library dose not exist。进行调试后,也不知道这个到库的文件指的是什么?求助大侠的帮助!
Attachments:
v2.zip ‏4375 KB

I can think of two reasons:
It is not possible to write here
static const char * FILE_PATH = ".\\sampleFile.tdm";
 The resulting exe is not in the same folder as the runtime components
Dominonilibddc\dev\bin\64-bit
Dominonilibddc\dev\bin\32-bit
The microsoft runtime of the ddc lib is not installed on the system. VS 2010 has a different runtime. So the MSVC redist that DDC depends on is missing.
Dominonilibddc\redist\64-bit\Microsoft_VC80_CRT_x86_x64.msm
Dominonilibddc\redist\32-bit\Microsoft_VC80_CRT_x86.msm
 This can be checked if you open for example
Dominonilibddc\dev\bin\64-bit\usiEx.dll
 in dependency walker.
http://www.dependencywalker.com/

Similar Messages

  • How can I read a TDMS 2.0 file using nilibddc.dll

    I have written some Matlab software to read TDMS files into Matlab using the MATLAB TDM example and the nilibddc.dll. However, when I create a TDMS version 2.0 file with Labview 2009 I cannot read it into Matlab as I get the error
    ERROR: TDS Exception in Initialize: Tds Error: TdsErrFileVersionTooNew(-2510)
    Is this due to the versioning of nilibddc.dll and if so when will this be fixed? I understand that I could convert the TDMS file to version 1.0 however this is impractical and time consuming given the large number of TDMS files that I am dealing with.

    borert-
    Please follow the posts on the link to the forum from muks. This forum will be updated by the Software Engineer currently working on this topic as per his post.
    Regards,
    Mike S
    NI AE

  • TDMS DLL

    Hello,
    I am trying to read a TDMS file in a Visual Studio C++ 2005 program.  I downloaded the DLL from http://ni.intellisurvey.com/run/2007codelicenseagr​ee and attempted to run the example program: readfile.c
    I got an error when attempting to open the file: -6211 described as "The storage could not be opened."   
    This happens with my files and others that I found on these forums.
    The open call the test program uses is marked as obsolete in the header so I changed it to use the new open call DDC_OpenFileEx()  but got the same results.  I also tried varying the arguments by passing null, "TDMS", or "TDM"  for the file type and/or passing 0 / 1 for the readOnly flag without success.
    I believe I'm using the DLL properly as calls to DDC_GetLibraryErrorDescription() work.
    I found that this problem has been reported on these forums before but didn't have a solution:
    http://forums.ni.com/ni/board/message?board.id=170​&message.id=286903&query.id=86898#M286903
    Any ideas?
    Solved!
    Go to Solution.

    Hello Curt,
    Thank you for posting on the NI Discussion Forums.  Running the example out of the box, I had to change line 26:
     static const char * FILE_PATH       = ".\\sampleFile.tdm";
    to point to a different path, because “sampleFile.tdm” was nowhere to be found in the download (at least not for me, unfortunately).  After pointing to an existing TDM file on my machine, the example “readFile.c” ran without error for me. 
    I was able to replicate the error message that you receive “The storage could not be opened” by changing the Security Preferences of the file to deny read privileges to my username on my machine.  These privileges can be changed by the machine’s administrator account by right-clicking on the file, and selecting Properties.  In the file properties dialog window, select the Security tab to see the security preferences of a given file for specific users by selecting a user.  Check to see if you are allowed reading access to the TDM file or not.  If you are not allowed those privileges, log on as the administrator and allow those privileges for your account.
    Another possible cause for this error could be that the file is in use by another program at the time you are trying to access it.
    Chris_G
    Sr Test Engineer
    Medtronic, Inc.

  • Error 6210 using TDMS C DLL

    Hi,
    I am trying to read a TDMS file using TDMS C DLL in visual studio 2012. I am getting the following error message. Error 6210 : The file passed to library is read only and cannot be modified, when I try to open the file using DDC_Openfile.The program I used is TDMSTesting.zip downloaded from this link
    http://forums.ni.com/t5/LabWindows-CVI/TDMS-DLL/td-p/792269
     The sample code given in the Zip file is properly running with the testtdms.tdms available in the file but I am getting the error 6210 with any other tdms files generated from labview.
    It would be of great help if anyone could help me to resolve this and I have attached the sample tdms file which I used to run the code.
    Thank you
    Padma Priya

    If you want to export to tdms
    pszFileName = "C:\out.tdms"
    use "TDMS" as file type.
    If you want to export TDM
    pszFileName = "C:\out.tdm"
    use "TDM".
    If you are looking for a simple way to export to tdm
    http://zone.ni.com/devzone/cda/tut/p/id/2824
    may be a solution for you. It has the capability to
    write a tdm header to an existing binary file given in
    a specified format (one header/one dll but TDM export only).
    P.S.: What error code did you get?
      Did a logfile appear?
      What do you mean by DIAdem error?

  • How to save tdm file from GPI extension DLL

    Hi,
    Is there any way to save data channels to tdm file format from GPI extension dll.
    I've tried lDataSave function, but I get DAT file format.
    I've also tried using Diadem.TOCommand interface, It'works with CmdExecuteASync method, but not with CmdExecuteSync (I've thought using a new thread with CmdExecuteASync, but what about synchronization ?).
    As I need to run a process like, do something, save tdm file, then do another thing, I'm a little lost.
    Thanks for any suggestion.
    JMA.

    Hello!
    First: I have no solution!
    Second: Some remarks to using a OLE interface to DIAdem in GPI.
    My experience is that there are only few situations and circumstances where it might be the only way to solve a problem. There are some critical things to know. If you create a ToCommand interface it isn't guaranteed that you get an interface to the proccess you are running in. In normal cases it will be but you can't be sure! CmdExecuteSync doesn't work because usually your command is initiated out of a script. While running a script DIAdem will not execute another command.
    The problem with CmdExecuteASync is that the command will be put onto the DIAdem command stack. It will be executed after the script is finished. You can not be sure that the channel data is the same as it was at the time you called CmdExecuteASync. Multiple Calls to CmdExecuteASync will be executed after another.
    Sorry that I do not have a solution but perhaps I can avoid some frustrating DIAdem-OLE-Test-Sessions.
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Nilibddc dll: opening tdms files with corrupt index files

    Hi there,
    i have a question regarding error handling, when using the nilibddc.dll.
    I want to use nilibddc.dll to open .tdms files. At the time i'm experimenting with some error cases and got stuck in one case:
    When i try to open a .tdms file with a corrupt .tdms_index file i get the error code -6211 (DDC_StorageCouldNotBeOpened).
    The .tdms_index file is corrupt because of errors while copying the file.
    The problem i noticed is, that i have a file lock on the corrupt .tdms_index file after DDC_OpenFile(...) (i can rename it, but i can't delete the file!?).
    As you can see in the code snippet - it isn't really special...
    int ddcError = 0, length;
    DDCFileHandle file = 0;
    ddcError = DDC_OpenFile (FILE_PATH, NULL, &file);
    // here i get ddcError == -6211
    if( ddcError == 0 )
    // do something with the file...
    ddcError = DDC_CloseFile(file);
    if( ddcError == 0 )
    cout << "no error - everything done" << endl;
    system("PAUSE");
     Do i miss something here? Should i use DDC_FreeMemory in somehow to release opened handles?
     I also tried to use the DDC_OpenFileEx(...) with readOnly set to true. But this doesn't change anything!
    Thanks in advance for help,
    Daniel
    Solved!
    Go to Solution.

    Hi there,
    thanks for the replies (and sorry for my late answer).
    The code above is from a simple Visual C++ Project that i use to run some tests with the dll.
    If i posted the question in the wrong topic please let me know - i found some other posts dealing with the dll so i thought i'm right here.
    I attached a tdms and the corresponding "corrupt" tdms_index file.
    The file handle stays 0 when i debug my code with that file and i receive the error -6211.
    I want to use the dll as part of an application that runs as system service. It reads and writes information from/to existing tdms files. After the information is read the application moves the files. So, if the tdms_index file gets corrupt (by whatever) i have the problem, that the index file is locked as long as the service is running and the file can't be moved. I can't tell how often this happens (hopefully never) but if i can do something against it, i would like to integrate this precaution.
    Thanks in Advance for any information & have a nice day,
    Daniel
    Attachments:
    samplefile.zip ‏3 KB

  • C TDMS DLL Visual Studio 2008

    Hello,
    I am pretty new to C/C++ development but I downloaded the C DLL for TDMS reading/writing. First I just opened the readFile.c sample and it said it couldn't find a needed header file. Then I made a new solution in Visual Studio 2008 where I made a c file and an h file and copied in the code from the TDMS C package. During compile I get errors like:
    Error    1    error LNK2019: unresolved external symbol _DDC_GetLibraryErrorDescription@4 referenced in function _main    readTDMS.obj    TDMSNI
    Can someone give me a step by step instruction on how I can run the readFile.c in the Windows console and see it read the data? 

    Did you just create a header file or did you add the nilibddc.h from \dev\include directory as mentioned in the README:
    The 'dev' directory contains the header file, import libraries, and binaries
    to be used during development. 
    Richard S -- National Instruments --Applications Engineer -- Data Acquisition with TestStand

  • Tdms.dll error loading file in DIAdem

    I'm trying to load a TDMS file written in LabVIEW 2010 into DIAdem 2010, but receive the attached error indicating an ACCESS VIOLATION in tdms.dll.
    I have several machines that this file loads into DIAdem 2010 fine on, but of course the one I need it to work on is the only one that it doesn't work on.
    The machine in question has a "fresh" install of Windows XPSP3 with minimal other stuff installed (it's a Dell Optiplex GX620, if that mattters).  As mentioned, the file loads fine on several other machines with DIAdem 2010 on it.  The machines that it works okay on are running Windows XPSP3, XPSP4 and Win7 (all Dell machines).  I have attached a list of installed applications on the PC in question.
    Any one have any thoughts?  Are there any programs that are incompatible with DIAdem?  Are there any installers that DIAdem (or tdms.dll in particular) depend on that need to be installed also?
    Joe Gerhardstein
    Averna Test Systems
    Certified LabVIEW Architect
    http://www.averna.com
    Solved!
    Go to Solution.
    Attachments:
    TDMS Error.JPG ‏14 KB
    programs1.JPG ‏115 KB
    programs2.JPG ‏105 KB

    In this case it is a two layer access.
    In this case it is a two layer access.
    tdms is an own component. If the native tdms VI's are used LabVIEW does not access USI.
    DIAdem access tdms by USI.
    In this case it is a two layer access.
    tdms is an own component. If the native tdms VI's are used LabVIEW does not access USI.
    DIAdem access tdms by USI.
    So in this case only the tdms component is updated/fixed and USI just makes use of the new
    TDMS component. So USI does not change at all.
    In this case it is a two layer access.
    tdms is an own component. If the native tdms VI's are used LabVIEW does not access USI.
    DIAdem access tdms by USI.
    So in this case only the tdms component is updated/fixed and USI just makes use of the new
    TDMS component. So USI does not change at all.
    Its a dependence graph.
    DIAdem depends on USI
    USI depends on TDMS

  • Linking error when using C++ DLL for writing TDM files

    I try to integrate TDM into my C++ code. Then I downloaded the package from the NI website "Integrating TDMS in Third-Party Products". I tested the the sample "writeFile.c". But a  linking error as following occurred:
    1>Linking...
    1>nilibddc.lib(implib.obj) : error LNK2019: unresolved external symbol __imp__wsprintfA referenced in function _LoadDLLIfNeeded
    1>.\Debug/Test TDM.exe : fatal error LNK1120: 1 unresolved externals 
    Can anyone help me out. Many thanks. 
    Solved!
    Go to Solution.

    I migrated my code from VC++ 6 compiler to VC++ 2005. Then linking errors are gone.
    nilibddc.lib(implib.obj) : error LNK2001: unresolved external symbol ___security_cookie
    nilibddc.lib(implib.obj) : error LNK2001: unresolved external symbol @__security_check_cookie@4
    P.S. "Read me" from NI says "The Microsoft 32-bit format is compatible with Microsoft Visual C version 6.0". But I tested the code with VC++6 professional with SP6 package and upgrade the SDK to the latest version that supports vc6. I still have the linking errors. My test seems prove that the dll does not support VC6. 
    Message Edited by Kuo on 04-22-2010 05:03 AM

  • TDM Importer in Excel 2003 does not appear in the COM Add-In Menu

    I have a program that will create a TDMS file with the data, and after execution is complete, I would like to import the data into Excel and manipulate it using a macro. I can import the file manually and run the macro by opening a second file containing the macro, but opening up the second file is a hassle.
    I would like to expand the macro so that it automatically imports the TDMS file, and based on what I've seen on the forums, in order to do this, I need to register the TDM importer as a COM Add-In. When I go to the COM menu in Excel and try to add ExcelTDM.dll, it does not appear in the menu.
    Some additional details that may be helpful:
    Excel TDM Importer is version 3.4.0.0
    I have already tried uninstalling and reinstalling the importer
    Using the Excel toolbar works to import the data
    Double-clicking on a file works to import the data
    The installed files are located at C:\Program Files\National Instruments\Shared\TDM Excel Importer. Moving them to C:\Program Files\National Instruments\Excel TDM had no effect.
    Thank you in advance for your help.
    Solved!
    Go to Solution.

    StefanR wrote:
    Does the simple VBA example as described here:
    http://www.ni.com/white-paper/10207/en
    work in your case?
    No, it doesn't. Excel does not see the add-in in the COM Add-In window, so I cannot access it using VBA.

  • How to Read TDMS Files in Matlab in OSX

    Using the example found on the NI website (http://digital.ni.com/public.nsf/allkb/0EEADA99DC​7D00A4862572E30037C3A2), I am able to read my TDMS files into Matlab when using a PC.  However, when I try to read them on my Mac, I receive an error:
    ??? There was an error loading the library "/Applications/MATLAB75/work/TDMS_files/dev/bin/ni​libddc.so"
    Error using ==> loaddefinedlibrary
    dlopen(/Applications/MATLAB75/work/TDMS_files/dev/​bin/nilibddc.so, 1): image not found
    Error in ==> read_tdms at 21
    loadlibrary(DLL_Path, H_Path);
     My best guess for this error is the fact that Matlab operates through a Linux interface on Mac, which I found will open the file type .so and not .dll for this type of library.  Is there some way to get around this in OSX and get it to read the .dll files?  Or is there some way to get the libraries as .so files instead of .dll files?
    Thanks for any help!
    -Shelby

    Shelby,
    You may wish to look at a Matlab script another user wrote since they were having issues with NI's matlab support:
    http://forums.ni.com/ni/board/message?board.id=170​&view=by_date_ascending&message.id=318487#M318487
    The script supposedly converts TDMS files directly in Matlab with no use of NI generated external DLLs.  He was having issues because the NI tools hadn't been updated for the new version of Matlab.

  • Reading TDMS files in Matlab

    I am trying to read TDMS files directly into Matlab using the NI  nilibddc.dll. I have read most of the posts on here but still have a problem...
    Within Matlab I can open and read a file and get the data but I cant find anything that tells me what the sample interval (between samples) is for a particular file. I guess its in the header somewhere but how do I access it?
    I cant find anything that tells what function to use to get it from the header.
    In fact i cant find anyhting that tells me what the functions are in the DLL.
    I tried opening the CHM help file, this has a list of all the functions but when you click on one in the contents it reports 'the address is not valid'. It seems the link is borken somehow in the help file (this is on XP)!
    any help gratefully receieved!
    mike

    hi mike,
    if your data is stored in form of waveforms, this information can be retrieved from the channel:
    Entity
    Property
    Data type
    Description
    tdm_channel
    wf_xname
    string
    Name of the x-channel of the waveform
    tdm_channel
    wf_xunit_string
    string
    Unit text of the x-channel
    tdm_channel
    wf_start_time
    time
    Time stamp for the waveform
    tdm_channel
    wf_start_offset
    double
    Starting offset (to be added to the time stamp)
    tdm_channel
    wf_increment
    double
    Increment
    tdm_channel
    wf_samples
    long
    Number of samples in one shot (needed by LabVIEW when concatenating
    more consecutive shots). This property is used by DIAdem and DataFinder to decide whether the tdm_channel is a waveform (wf_samples > 0) or not (wf_samples = 0, or not existing).
    tdm_channel
    wf_time_pref
    string
    (enum: "absolute" or "relative") Additional information for LabVIEW to
    determine if the x-channel is treated as time (absolute) or as index
    (relative). (not available in LVM)

  • How to use TDMS API in Visual Studio 8.6

    I am using Measurement Studio 8.6.1 for Visual Studio 2005. I need to read/write TDMS files from my mfc c++ application and I can't figure out how to add the TDMS capability to my visual studio project. I don't think it's part of the installed c++ class libraries, yet it is available as a .net library. help!

    Hi Julienp,
    You can download a C dll from this website: http://research.ni.com/run/2007codelicenseagree to do TDM/TDMS communication with your C++ project.  There is another thread that discusses some of the problems another poster had with using this, so it may also be helpful to look over if you have problems using the dll: http://forums.ni.com/ni/board/message?board.id=180&message.id=37932
    Eric B.
    National Instruments

  • Request for TDMS files (testing Matlab importing code)

    Dear all,
    I'm currently working on modifying the example 'ReadFile.m' that comes with the .dll from NI. I have got to a stage that I'm reasonably happy with, imports multiple groups with multiple channels of different sizes. Can import timestamp data, extra file properties.
    I will post up the completed code eventually but I wanted your help by sending me random formats of TDMS files, I have tested a few different formats, but mostly of my own concoctions so they may not cause errors that I need to make the code more robust.
    Any help appreciated sending TDMS file. Obviously don't send any data that you don't want the world to see.
    Many thanks in advance
    Pete
    Pete
    Systems engineer (CLAD LV2013)

    Hi Pete,
    Not sure if there's anything in particular which you were looking for, but please see attached for a quick TDMS file I put together. It's a pretty basic file with random numbers, but hope it helps.
    Attachments:
    TDMS File.zip ‏442 KB

  • TDM Header Writer C API: Newer version available?

    Hello support team,
    we are using in our software the library "nilibddc.dll" for importing TDM data. The library "niTdmHW1_0.dll" is used to export data into the TDM data format. Now, our requirement is to support text channels. The library "niTdmHW1_0.dll" does not support the "STRING" data type but various numeric data types and cyclic channels (implicit). On the other hand, the library "nilibddc.dll" supports the data type "STRING" but only a few numeric data types (UINT8, INT16, INT32, FLOAT and DOUBLE).
    Our export must support the following data types:
    INT8
    INT16
    INT32
    INT64
    UINT8
    UINT16
    UINT32
    UINT64
    FLOAT
    DOUBLE
    STRING
    Impilict channel
    What is the best way to solve our problem? Maybe, it exists a newer version of the library "niTdmHW1_0.dll" which supports creating text channels?!
    Thank you very much for your help.
    Best regards,
    Henrik

    No, the values are not limited. The value count is free and each value of the channel can differ. The character count can be either fixed or non fixed.
    For example:
    0s -> "Test1"
    1,5s -> "Test2"
    5s -> "Hello"
    The text channel should be some kind of a marker channel (event-oriented).  Its appropriate time channel is not cyclic.

Maybe you are looking for

  • After upgrade 10.6.2 computer no longer goes to sleep. system.log active.

    I can put it to sleep and it will do so (light in button slowly blinks). However over the energy control panel it no longer goes to sleep. In my system.log I see endless activity. Not sure how this will help me fix it though. Here is some of it. Dec

  • Exaile HTTP Streaming Broken

    After the latest exaile update it appears that http radio streaming is broken. I've searched both the forum and bugtracker and got no hits. The error when trying to play a stream in the gui is: A HTTP protocol source plugin is required to play this s

  • Error when sending infotype 2 via ALE - start date

    Hi all, we are facing the following error when using the standard method for HR distribution: changes in infotype 2 cannot be processed in the receiving system; each change results in a 51 error in the iDoc, with message "PA0002 could not be updatedu

  • I was unable to download apps into my iPad 2 and it was running iOS 6.1.3

    Hello     I am Lalith,I purchased iPad 2an year ago.i was unable to download apps from AppStore.it was asking password when I entered it was starting the app download but showing only waiting but was not downloading.i had same problem earlier ago as

  • Number precision in Clustering rules

    When runing O-Cluster I get rules with many variables (say VarX) showing the following number: if ..... VarX>=1.40129546324817E-45 then Cluster equal ..... I set the preferences with precision =4 Shouldn´t I get then VRAX>=0 ? Tkx D