DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

10 - 90 rise time

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.

 

0 Kudos
Message 1 of 4
(7,314 Views)

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.

 

 

http://www.ni.com/white-paper/13974/en#toc7

Patrick H | National Instruments | Software Engineer
0 Kudos
Message 2 of 4
(7,288 Views)

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

Message 3 of 4
(7,277 Views)

Thank you very much! It worked.

0 Kudos
Message 4 of 4
(7,153 Views)