DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

how to find out maximum value of a channel within a time period

hi
 
i used ChnPeakFind to find maximum value in a signal.but now i want to find maximum value of a channel within a specified range of time .
Regards
RCalicut
0 Kudos
Message 1 of 10
(7,473 Views)
Hi RCalicut,

Although there is no explicit command to search for peaks in a certain time range, using the ChTimeAreaCopy command you can copy a specific time slice of your signal to a new set of channels, then perform your ChnPeakFind command on just that time slice.

Hope this helps!

Dan Weiland
Applications Engineer
National Instruments

Command: ChnTimeAreaCopy
Copies a time range and the related amplitudes into two new data channels.

Call ChnTimeAreaCopy(X, Y, E, E, TimeAreaCopyBeg, TimeAreaCopyEnd)

Input Parameters
X Specifies the data channel that contains the time values.
Y Specifies the data channel that contains the amplitudes.
E Specifies the result channel for the time values.
E Specifies the result channel for the amplitudes.
TimeAreaCopyBeg Specifies the start value of the time range.
TimeAreaCopyEnd Specifies the end value of the time range.


Dan Weiland
0 Kudos
Message 2 of 10
(7,463 Views)

Hello,

 

I'm looking for the same function.

What you suggest works fine if you just want to get the Max value.

If you copy the spec. Channel to a new channel you'll loose the channel index of the original event.

If you want to use  the Max. Value of the PeakFind func. of the original channel for e.g.. a Trigger to synchronize other channels of the measurement your solution doesn't work.

If I use your purpose I've to compare the copied values with the original values to find the correct channel line (index) within the original channel.

 

So It would be niche to get the function findPeakmax or min in time period.

 

Cheers

 

Thomas

 

DIAdem 2010

0 Kudos
Message 3 of 10
(7,013 Views)

Hi,

 

You may want to consider the StatBlockCalc function. It will give you the maximum amplitude of a channel and you can limit it to search only a limited number of values.

Then find that maximum value with the ChnFind function and set the starting index to the first line you want to include.

This should return the index of the maximum value as long as you have a true maximum (just 1).

You could check by running ChnFind again from the index of the first maximum value to see if it is unique in the window specified.

 

 

HTH,

Marcel

0 Kudos
Message 4 of 10
(7,001 Views)

with chnpeakfind , you search peak value and not the maximum... if the max value is the first value chnpeakfind doesn't work.

use cch and chnfind

0 Kudos
Message 5 of 10
(6,968 Views)

Hi,

 

We are looking for Max. Value & Min. value as mentioned in attached waveform.

 

Kindly advice how can i calculate this time specified certain amplitude.

 

Thanks & Regards,

 

Dinesh

 

 

0 Kudos
Message 6 of 10
(6,132 Views)

Hi

 

If the rule is: after a local maximum follows a local minimum, then this can work:

Find all local maximum (PeakSearch)

Find all local minimum (PeakSearch)

Sort the first X/Y result

Sort the second X/Y result

Subtract the sorted Y1 result from the sorted Y2 result

 

Result: the highest amplitude is the maximum value of the subtraction result.

 

I hope this helps

 

Greetings

Walter

0 Kudos
Message 7 of 10
(6,125 Views)

Hi

 

Thank you for your reply, I'm new for Diadem.

 

Kindly send us the command code or setting to fnd the result.

 

Dinesh

0 Kudos
Message 8 of 10
(6,121 Views)

Attached you find a example script and a test dataset

 

Greetings

Walter

0 Kudos
Message 9 of 10
(6,108 Views)

Hello Dinesh,

I read through your initial question again . Perhaps we were trying to solve a problem which is more complicated than what you were really asking for. When I looked at the picture you attached, I thought you were simply looking to the time value (x-value) of a waveform at 2 points . The absolute maximum and the absolute minium

 

So, are you only asking how you can find the time value for the maximum y-value and the time value for the minimum y-value ?

0 Kudos
Message 10 of 10
(6,060 Views)