DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Find Peaks of individual cycle pressure

Hi,

 

Is there a way to find the individual peak values [ highlighted in red] of each cycle pressure and store all peak values in new channel.

Also want to record its corresponding crank angle in an another new channel.

 

sample image below:

X: crank angle

Y: pressure

 

Durai26_0-1720367418462.png

 

something like,

Index Peak values channel Crank angle channel
1 y1 x1
2 y2 x2
3 y3 x3
4 y4 x4

 

 

thanks,

Durai

0 Kudos
Message 1 of 2
(271 Views)

Hi,

 

You can try this line of code:

' Calculate the interval size PeakWdwPct, as a % of the recording duration (input to ChnEnvelopes function)
Dim RecordingDuration, PeakWdwPct
RecordingDuration = (oChn.Size-1) * oChn.Properties("wf_increment").Value
PeakWdwPct = PeakWdwDuration/RecordingDuration*100 ' [%]
Call ChnEnvelopes("",oChn,Grp_Name & "/UpperX_" & Chn_Name,Grp_Name & "/UpperY_" & Chn_Name,Grp_Name & "/LowerX_" & Chn_Name,Grp_Name & "/LowerY_" & Chn_Name,PeakWdwPct)

 

 

 

Where PeakWdwDuration is the expected period between 2 peaks, in seconds.

oChn is a waveform channel object

 

Jacques

0 Kudos
Message 2 of 2
(196 Views)