12-09-2012 05:47 PM
Hi Everyone,
I would like to know how to calculate the 10-90% rise time in diadem of a simple pressure wave. Is there a particular function?
Thank you in advance.
12-10-2012 05:04 PM
Hi Greentea2,
If I understand your question correctly, you would like to know the time elapsed from 10% of the maximum of the way to 90% of the maximum of the wave? If this is the case you could write a script that takes the channel maximum property and calculate what 10% and 90% would be. Then you could iterate through the channel and determine what index is closest to those two values. From here you could use those indexes to get the time at each index of the Time channel associated with the wave and then do a subtraction. I have pasted a link to the basics of automating tasks in DIAdem and I would recommend looking through example files and help files. I am also willing to provide more assistance if you have particular questions.
12-11-2012 01:35 AM
Hi greentea2,
If I get you right you need the following script:
Dim oChnT, oChnV, d10PercentVal, d90PercentVal, dStartVal, iStartPos set oChnT = Data.GetChannel("[1]/Time") set oChnV = Data.GetChannel("[1]/MyChannelY") dStartVal = oChnV.Properties("maximum").Value * 0.1 iStartPos = ChnFind("Ch(""" & oChnV.GetReference(ExtendChnName) & """) > " & str(dStartVal) & "") ' linear interpolation to find the correct 10% value d10PercentVal = oChnT(iStartPos-1) + (oChnT(iStartPos) - oChnT(iStartPos-1)) / (oChnV(iStartPos) - oChnV(iStartPos-1)) * (dStartVal - oChnV(iStartPos-1)) dStartVal = oChnV.Properties("maximum").Value * 0.9 iStartPos = ChnFind("Ch(""" & oChnV.GetReference(ExtendChnName) & """) > " & str(dStartVal) & "") ' linear interpolation to find the correct 90% value d90PercentVal = oChnT(iStartPos-1) + (oChnT(iStartPos) - oChnT(iStartPos-1)) / (oChnV(iStartPos) - oChnV(iStartPos-1)) * (dStartVal - oChnV(iStartPos-1)) ' result msgbox d90PercentVal - d10PercentVal
Greetings
Walter
01-24-2013 03:29 PM
Thank you very much! It worked.