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.

Similar Messages

  • 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

  • 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

  • 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?

  • TDM Import Error

    I'm trying to open my data file in Excel spread sheet. There are 5000 sheets and Excel stops at sheet 4749 on two different computers.
    "TDM Importer" " An unknown error occured: 0x80004003.
    I'm using Excel 2010 32 bit version with the TDM importer add-In , I have the tdms.dll installed.
    Any reason why it crashes?
    Thanks

    I've never seen a file import/conversion for Access but that doesn't mean one doesn't exist.
    The error code 0x80004003 appears to be an invalid pointer. Perhaps the TDMS file is corrupt or the excel importer can't handle something about that  measurement group.
    Hooovahh is right, the TDMS file viewer would probably do the job.
    Assuming you have LabVIEW installed: Programming > File I/O > TDMS Streaming > TDMS File Viewer.
    If you only have the TDMS files but no LabVIEW then the TDMS Excel import function recommends NI DIAdem for large data sets.
    Looks like someone has compiled a stand-alone version of the viewer here.
    Troy
    CLDEach snowflake in an avalanche pleads not guilty. - Stanislaw J. Lec
    I haven't failed, I've found 10,000 ways that don't work - Thomas Edison
    Beware of the man who won't be bothered with details. - William Feather
    The greatest of faults is to be conscious of none. - Thomas Carlyle

  • TDMS Open error -2519 on CompactRIO

    I have a cRIO-9073 controller on which I am streaming analog input data at 40kHz from a 9215 module into a local TDMS file.  Data collection is triggered via a switch on a front panel -- turn the switch on and it starts recording the A/I data and streaming to disk, turn the switch off and I shut down the A/I and close the TDMS file.
    Everything seems to work fine but occasionally when I turn on the data collection switch I will get an error -2519 (LabVIEW could not load the TDMS file component) from the TDMS Open call.  If I turn off the data collection switch, then turn it back on, the next call to the TDMS Open function hangs and never returns.
    During this time I can see that other functions in my VIs are continuing to execute (other lights & values on my front panels continue to update), but I cannot stop the VI from within Labview on my windows development system -- hitting the stop button doesn't do anything.  It seems that the only solution is to reset power on the cRIO controller.
    Does anyone have any more details about this error -2519 or ever seen any problems with the TDMS Open function hanging?
    Thanks,
    AJ

    Just to add a bit more information, I was having a similar problem except the application (both Labview dev environment and the app executable) was crashing.  Searching Window's application log turned up this notice:
    Faulting application name: LabVIEW.exe, version: 10.0.0.4032, time stamp: 0x4c24f059
    Faulting module name: tdms.dll_unloaded, version: 0.0.0.0, time stamp: 0x4c91c585
    Exception code: 0xc0000005
    Fault offset: 0x3505eff8
    Faulting process id: 0x1e4c
    Faulting application start time: 0x01cbbdc6da377ab1
    Faulting application path: C:\Program Files\National Instruments\LabVIEW 2010\LabVIEW.exe
    Faulting module path: tdms.dll
    That exception code is an invalid memory access error.  Looks like tdms.dll was being unloaded in the brief time between closing a file and opening a new file but LV didn't quite keep up.  In any event, the workaround Herbert suggested stopped the crashes.

  • Storage VIs internal error, TDMS file

    I use LabView 8.5.1, DAQmx 9.0.2. and a module NI-USB6216.
    I configure on my application a task as follows: 15 channels activated with a sample rate of 1sample/10s (very slow). My acquisition has to run for a few days or more.
    Sometimes, I obtain the error  "Storage VIs internal" error (code -2500). then I cannot read my TDMS file (see attached the file) and I cannot treat my data.
    Do you know the exact meaning of this error on the case of a TDMS file. Do yo have a solution to treat my data? 
    Best regards, Daniel.
    Solved!
    Go to Solution.
    Attachments:
    Data.zip ‏436 KB

    I tried with LabVIEW 2010 and didn't see the problem when reading your attached TDMS file.
    Please download the latest TDMS installer from here:
    http://zone.ni.com/devzone/cda/tut/p/id/9995
    Please backup tdms.dll on your computer like in c:\program files\national instruments\shared\tdms\ and then run the installer.

  • Event Handling in labview with arrays as event data

    Hey folks,
    I have a Labview Application which uses a dll to read Ethernet data. The setup is such that, when the dll has fresh data it sends out an event to the Labview Application so that the fresh data can be displayed.
    However i have only managed to get this event based mechanism to send out a single structure at a time. Hence if there are 10 fresh data values, i need to send out 10 events (each event structure contains the parameter name, parameter value, unit and time stamp). It would be more efficient to send out an array of structures in a sigle shot.
    I have tried this but Labview keeps crashing saying that an error was encountered and Labview needs to close along with an access violation message. I did a lot of online searching and found some LV code for event handling but not come accross any implementation which uses arrays as evend data. Is this supoorted? And if so is there any example vi that can be shared so that i get some knowledge about this.
    Many Thanks in adavance,
    Abel. 

    I also gave a try by using a variant as the event data type instead of the cluster which contains the array of floats. I converted the cluster into a variant and used that to create the user event reference. Followed the same logic while decoding the dats.
    But still the crash.... Here is the windbg output...
    ModLoad: 07580000 075b7000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvalarms.dll
    ModLoad: 0ca90000 0cb72000 C:\Program Files\National Instruments\LabVIEW 2012\resource\mesa.dll
    ModLoad: 0c7f0000 0c7f9000 C:\Program Files\National Instruments\LabVIEW 2012\resource\lvuste.dll
    ModLoad: 35000000 3509b000 C:\Program Files\National Instruments\Shared\TDMS\tdms.dll
    ModLoad: 0c860000 0c87c000 D:\SapphireViewer\dll\SapphireClientDll.dll
    ModLoad: 0e240000 0e2c7000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCP80.dll
    ModLoad: 0e2d0000 0e36b000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.6195_x-ww_44262b86\MSVCR80.dll
    (1cb0.1a34): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=0e47f8b4 ebx=051f0040 ecx=051f0040 edx=061e5764 esi=22820840 edi=07b10040
    eip=03c2050c esp=0e47f5cc ebp=0e47f810 iopl=0 nv up ei pl nz na po nc
    cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00010202
    *** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\Program Files\National Instruments\LabVIEW 2012\resource\tdcore_12_0.dll -
    tdcore_12_0!LvVariant:etContents+0xac:
    03c2050c 837e3100 cmp dword ptr [esi+31h],0 ds:0023:22820871=????????
    I cannot really tell whats going on. Looking for some pointers.
    Regards,
    Abel.

  • 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

  • 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

  • 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 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/

  • 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.

Maybe you are looking for

  • Enterprise Manager console can't connect

    Hi, I have successfully installed an Enterprise Manager and everything works fine except when I installed the Enterprise Manager client on a different machine, it cannot find the enterprise manager server. What did I miss out? Thanks. Mignonette Viad

  • IMac to iMac connection cable?

    Hello nice smart people, Which cable would I need to connect my mid 2010 iMac to my new 2012 iMac to use as a 2nd monitor? Apologies for the simpleton question....

  • SXMB_MONI - weird message "Acknowledgement not possible"

    Hi All, I Am working on an async scenario of: ERP -> IDOC -> XI -> PlainHTTP -> 3RDPARTY I have now got the original message doing all that I want it to, I create it in the ERP system, it goes through XI and ends up at the right place. But I had a fe

  • Export/import web analysis documents from a script

    Does anyone know of a way to export and import WA documents to their .apt files in any way other than through the studio GUI? Even if its not simple, I'm willing to jump through any hoops required. Thanks in advance!

  • Inserting plugin to channelstrip in solo mode - bug?

    When I choose audio track, solo it (not region-based solo, but channel-based) and insert some plugin (Logic or 3-rd party), the sound is cancelled upon inserting a plugin and I have to solo-off the channelstrip to hear the sound from it again. That m