DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Any way to load TDM-files into external programs?

I have seen a C-API to create a TDM-Header dependent on a binary file. Is there any way to load TDM-files into external programs? 
Finaly I want to load TDM-files into Igor Pro and so I have to create an import-filter. Please let me know if someone dispose of these possibility!
 
Best regards, Dominik
0 Kudos
Message 1 of 12
(6,189 Views)
Dominik,
 
I was wondering if you were able to load TDM files into IGOR?  I am wanted to take a large file ~250MB and put it into Igor Pro. 
 
Thanks,
Travis
0 Kudos
Message 2 of 12
(6,118 Views)

Hi Guys,

I am not familiar with the import plugin technology that Igor Pro offers.  Would a C API that reads and writes TDM files help, or is the interface something completely different?

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 12
(6,098 Views)

well, I got IGOR to read the TDM file, but the problem is that I have 5 signals.  Those 5 signals have different number of samples.  When I read it back in Labview, it knows the delimiter that seperates each signal.  IGOR doesnt.  I can get the results but can't get the signals seperated correctly...

 

Thanks,

Travis

0 Kudos
Message 4 of 12
(6,079 Views)

Hello Travis,

It sounds very interessing that you could load data into Igor! Smiley Happy At present I have no opportunity to get my data into the program.

Please tell me however you can load data into Igor Pro.

Thanks & best regards, Dominik

 

 

 

 

0 Kudos
Message 5 of 12
(6,056 Views)

Hi Travis,

I'm afraid I'm not making any sense out of your statements.  You say that Igor can read the values in from your TDM file, but that it doesn't recognize the delimiters correctly like LabVIEW does, resulting in values from the 5 channels being mapped into 1 large channel.  This would make sense if you were talking about an ASCII file, but TDM files don't have delimiters!  Are you perhaps reading an ASCII file into LabVIEW and then outputting it to TDM?

Please help me to understand your situation,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 6 of 12
(6,040 Views)
Domink
 
What I did in IGOR was went to the data tab, load wave, load general binary file.  The data Type is double float since that is what I am using in Labview and I selected the .tdx file.  From here, I just went to new table, selected the wave and it loaded the values on a table.
 
Brad.
 
Here is what I am encountering and hopefully I explain this well enough.
 
Input signal is a function generator that I have splitting off in a BNC box that is connected to a PCI 6143.
 
I have 5 channels.  I save the values of all 5 channels in a TDM file.  Each channel has a different number of samples when saved.
 
IE - (these are just made up sample number)
Channel 1 - 1000 samples
Channel 2 - 1000 samples
Channel 3 - 950 samples
Channel 4 - 900 samples
Channel 5 - 850 samples
 
In labview when I read back the TDM file and get the results to visually look at it. Graphically I get 5 channels, all with the the exact number of samples that it was saved as.  Array wise, I get 5 columns, with the values but when lets save row 849 comes up, row 850 will display lets say [ 1.2 2.358 3.4 45151 0 ] and in row 900  [2.544 2.369 3.599 0 0 ] (again made up numbers).  Regardless, labview knows to separate each channel.
 
In Igor, I do what I explain to domink.  But when I enter in array of 5 on which is how many columns I want, what I think Igor is doing is taking the total number of samples, and dividing it by 5 which gives you 940 rows and then it puts values in those cells.  So instead of Channel 1 continuing to put its values in column one after row 939, it continues to column 2.
 
Let me know if I explained this well enough.
 
Thanks,
Travis

Message Edited by guilio_2000 on 11-06-2006 11:10 AM

0 Kudos
Message 7 of 12
(6,010 Views)

Hi Domink,

You can look near the top of your TDM file to see what the binary blocks are like for each channel (start byte, data type, byte order).  My guess is that each channel's values are stored in a contiguous block that contains that channel only, so you'd have something like:

Ch1_Val1
Ch1_Val2
       :
Ch1_Val1000
Ch2_Val1
Ch2_Val2
       :
Ch2_Val1000
Ch3_Val1
Ch3_Val2
       :
Ch3_Val950
Ch4_Val1
Ch4_Val2
       :
Ch4_Val900
Ch5_Val1
Ch5_Val2
       :
Ch5_Val850
 
What I don't know is if Igor can handle this binary footprint,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 8 of 12
(5,989 Views)
Brad,
 
I do see that when I import the tdm file into IGOR using only 1 array rather then trying to separate them into 5.
 
How does Laview know when
Ch1_Val1000 ends and to start Ch2_Val1 back at the begining?
 
Thanks,
Travis
0 Kudos
Message 9 of 12
(5,976 Views)

Hi Travis,

LabVIEW handles this automatically by reading the information in the TDM file that describes where each channel starts and stops, it's data type, byte order, etc.  I am unfamiliar with Igor's binary file import options, but I'm guessing that it's an import engine that you parametrize.  If so, it may or may not have provisions for data like this which is stored end-to-end, since interleaved channel storage is more common.  If instead Igor has some way to programmatically load binary data, then you would be able to use those functions to move the file cursor to the correct start position of each channel.

If the direct binary import turns out to be a dead end, then you might try converting the TDM file to an ASCII file and loading the ASCII file into Igor.  Most programs have better ASCII file support than binary support.  It would be much slower, of course, but at least you would have a workaround while you try to pry an answer out of Igor's support/documentation.

You can load TDM files directly into Excel if you have downloaded the TDM Excel Add-in from:
http://zone.ni.com/devzone/cda/tut/p/id/4906

If you have access to either LabVIEW or DIAdem, then they could each convert the TDM file to an ASCII file.  LabVIEW and DIAdem can also read TDM files natively and preform most of the same tasks as Igor.  You could download a 30 day evaluation copy of DIAdem from:
www.ni.com/diadem

Brad Turpin
DIAdem Product Support  Engineer
National Instruments

0 Kudos
Message 10 of 12
(5,950 Views)