12-19-2011 06:28 AM
Solved! Go to Solution.
12-19-2011 07:56 AM - edited 12-19-2011 07:59 AM
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?
12-19-2011 08:21 AM
Hi thanks for the reply.
First what is the difference between TDMS and TDM ??
I can see that the files I found is probable related to TDMS, and the ones you suggested is TDM.
The TDM looks much simpler "niTdmHW1_0.dll" etc. But why is it called TDM Header Writer, can it only write headers?
-cpede
12-19-2011 12:35 PM
The two formats TDM/TDMS represent two flavors of the NI file format.
Formats:
Libaries:
P.S.: The name DIAdem in the help file is the name of the API in LabWindows/CVI. Because TDM was first introduced in NI DIAdem. The API was exported to allow 3rd party to read/write TDM/TDMS files.
12-19-2011 05:13 PM
I'm not sure I fully understand the difference. TDM is a file format where you add an xml header to an already existing binary file, and TDMS is a binary file format for string data.
But when I change the File Format parameter in DDC_CreateFile from "TDC"to "TDMS" my program doesn't crash, but the function fails with error -6204, and the callstack shows:
First-chance exception at 0x770ee124 (kernel32.dll) in xxx.exe: Microsoft C++ exception: DataCache::ToIntMsgDa at memory location 0x08a5f6fc..
First-chance exception at 0x770ee124 (kernel32.dll) in xxx.exe: Microsoft C++ exception: ni::usi::Exception at memory location 0x08a5f7a0..
First-chance exception at 0x770ee124 (kernel32.dll) in xxx.exe: Microsoft C++ exception: DDCError at memory location 0x08a5fb18..
The DDC methods looks as they supports what I want. Besides that if fails my biggest problem is all the dependent DLL's needed.
-cpede
12-19-2011 11:45 PM
TDM: 2 file format. XML header(*.tdm) + Binary file(*.tdx)
TDMS: 1 file format (*.tdms) + optional index file that is recreated if deleted.
Did you also copy the DataModles folder or only the dlls?
Are you capable to run the included examples?
Greetings
Andreas
12-20-2011 02:57 AM
Ok, I got it to work.
I like the API it is simple and intuitive.
BUT
No Unicode support ?
No multi-dimensional support ?
And, there is no way that I install 10 DLL plus a DataModel folder into my application for supporting TDMS export.
I know that NI doesn't care much about installing a lot of unnecessary stuff on the users PC, just look at the
DAQmx driver installation over 1 GB for installing a simple AD driver ??? This is the no one complaint from our
customers !!!
So, no way I'm installing all these files. I will stick to HDF5, one DLL, lib and header file.
Thanks for all the help, and I really hope NI begins to take this serious.
-cpede
12-20-2011 03:15 AM
Ok, just for information, when I use the TDMS format it seems that I can strip the installation down to the following files:
nilibddc.dll
tdms_ebd.dll
usiPluginTDM_dll
uspTdms.dll
DataModels -> USI -> TDM -> 1_0 -> USI_TDM_1_0.xml
If selecting TDM and maybe calling other methods, who knows ?
By the way, I can get the error message: "Error occurred when loading the DIAdem library DLL (nilibddc.dll)", and that is
what I mean by mentioning DIAdem, even it is a standalone driver.
-cpede
12-20-2011 03:36 AM
You can't strip anything from the package. There is no way that you do not need the files you do not mention.
The package includes an installer module that helps to install the component on target systems.
Its like I said.the DDC means DIAdem Connectivity. That is the name of the API because of historical reasons.
03-15-2015 05:59 PM
Hello,
I could use your expertise, too.
I keep on getting this error: "Error occurred when loading the DIAdem library DLL (nilibddc.dll)"
I am using VS2010C++ express version.
Thank you
B