02-06-2014 03:36 AM - edited 02-06-2014 04:05 AM
Hello,
I am new to DIAdem, I have gone through the basics, hand-on etc. But I have not been able to make much progress with my problem.
I was wondering if anyone can give me some pointers on how to proceed.
I have TDMS files being generated every hour for 90days. Yes a test lasts for 90days and there are mutilple stations!
There are different groups within each file and each group has its on LabVIEW timestamp.
I need to automate generation of some reports done daily, weekly and monthly etc.
So here are my thoughts:
combine 23 files using copy \b <hour0> + <hour2> ... <hour23> day.tdms
Then reduce the files by only taking every nth sample to form day_reduced.tdms.
Now combine all day_reduced to form month.tdms
I am not a big fan of duplicating data but I dont have much time to try things, Is the above ok?
Please help/comment!!
Thanks in advance.
Solved! Go to Solution.
02-06-2014 08:52 AM
Hi Unspecified,
Concatenating the TDMS files outside of DIAdem is certainly one good option-- the DOS concatenation option is pretty darn fast, but as you say that duplicates data. Another option would be to reduce load each data file into DIAdem and concatenate them in the Data Portal.
Is there any way you can send or post several of these data files so I can see directly what you're dealing with?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
brad.turpin@ni.com
02-19-2014 03:52 AM - edited 02-19-2014 03:53 AM
@Brad_Turpin wrote:
Concatenating the TDMS files outside of DIAdem is certainly one good option-- the DOS concatenation option is pretty darn fast, but as you say that duplicates data. Another option would be to reduce load each data file into DIAdem and concatenate them in the Data Portal.
Is there any way you can send or post several of these data files so I can see directly what you're dealing with?
Thanks for the reply. I think speed is very important and if you think DOS merge is the fastest, DOS merge it is.
I have managed to sort the other problems like remove invalid data, convert time stamp etc. using the following function (my vb is a bit rusty, I know some of it is cringe worthy) it does the job!
Sub DoPreparations(sTimeChannel,iGroupIndex) Dim Channel, UTC_Offset, LV_DD_Offset, sChnNoStr, sChnStr, j UTC_Offset = 8*(3600) ' secs from GMT to measurement location LV_DD_Offset = 60084288000 ' secs from 0 AD to 1904 AD Set Channel = Group.Channels(sTimeChannel) ChanStr = Channel.GetReference(eRefTypeIndexName) Group.Activate sChnStr = "Ch(""[" & Str(iGroupIndex) & "]/" & sTimeChannel &""")=1/(1/Ch(""[" & Str(iGroupIndex)&"]/" & sTimeChannel &"""))" Call Calculate(sChnStr,NULL,NULL,"") sChnNoStr = Str(cnoxget(iGroupIndex,1))&"," & Str(cnoxget(iGroupIndex,3)) & "-" & Str(cnoxget(iGroupIndex,GroupChnCount(iGroupIndex))) FOR j = 1 To Group.Channels.Count IF Channel.Properties("length").Value = Group.Channels(j).Properties("length").Value THEN ELSE Group.Channels(j).Properties("length").Value = Channel.Properties("length").Value END IF NEXT 'j IF Channel.Properties("novaluekey").Value = "Yes" THEN Call ChnNovHandle(Channel,sChnNoStr,"Delete","X",True,False) End IF ChnFormat(ChanStr) = "Time" Call ChnLinScale(Channel, Channel, 1, LV_DD_Offset-UTC_Offset) End Sub
I then use
Call DataFileLoadRed("<file>","TDMS","","IntervalWidth",%d,1, NULL, NULL)
to decimate the file. Job Done.
I am impressed by the speed of it all.... Customer impressed! Kudos to the DIAdem team.