02-05-2015 06:40 AM
Hi all!
I'm really new to Diadem. I'm working on a project, where I have to analyze more than 100 tdm files with 200+ channels each.
My task is to find a specific channel in the tdm files, and export its values to an excel file.
I cannot load tdm files all at once, so I'm lookinhg for a script, that can automate this process.
(Load file, find channel, export values; one by one)
Any help would be appriciated.
02-05-2015 11:36 AM
Hi Godsgift,
I recommend that you index those 100 TDM files with the DataFinder, then execute a DataFinder query to find the channel of interest. Then you can export that channel of values with the CSV DataPlugin, or you can export it as a TDM or TDMS file and load it into Excel with the TDM Excel Add-in that ships with DIAdem and is available for free download.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-06-2015 04:27 AM
Thank you Brad.
This might work, but I'm looking for a script to solve this task.
Could you provide a code that can work like your mentioned method?
Starting like this, that loads the files one by one:
file_ex = true
m_file = 1
Do While (file_ex = true)
m =str(m_file,"DDD")
m = Replace(m," ", "0")
T1 = " filepath " + m +".tdm"
m_file = m_file + 1
file_ex = FilEx (T1)
Call DataFileload(T1)
Loop
02-06-2015 10:58 AM
Hi Godsgift,
I can't provide you with code when your requested behavior is so vague. All you've said is, "My task is to find a specific channel in the tdm files". How? Based on what? Is it a particular channel name, or a particular value of the channel maximum, or a channel with a particular unit?
Can you query the 100 files in the Data Finder yet? That's the first step to solving this efficiently.
Brad Turpin
DIAdem Product Support Engineer
National Instruments