03-08-2017 12:51 PM
Hello,
I am trying to create a VI in which I am supposed to find the time interval between two peaks of waveform.The peak detection I am doing using a case structure using threshold values.
My problem is finding the time interval.Is there any block, which I can directly use, which triggers and resets as I want , and mean time returns the duration between that.
I tried using the elapsed time VI , but it seems it is only for getting th elapsed time if you have the run time known.
Any hint will be appreciated.
Thank You very much
Anupam
03-08-2017 12:57 PM
No one will be able to give you relevant help, unless you attach your VI.
03-08-2017 01:04 PM - edited 03-08-2017 01:05 PM
I just did this in a project, I don't think there is a built in VI or block to use as suggested. I used threshold VI to find raising edges, then manually data searched for the falling edge across the same threshold. The points between that represent the 'peak event' and I then found the position and max value of the highest peak in that dataset. Once you have each peak, you can get differences between them with simple subtraction of the timestamps. Lots of other things to consider like if you are sampling in blocks, how to handle peaks crossing sample sets, cache that data, and if you have other filters, like discrimination width or other filters to apply. Hopefully you don't need all those other things, as its gets complicated, but hope that helps you get a solution as well.
03-08-2017 08:21 PM - edited 03-08-2017 08:22 PM
Hello people,
Thanks for your answers.
Using threshold is a good idea, rather than using case structures. I was trying to use it, but it was somehow not working.(VI attached).
Can you have a look at my VI and comment.
Thanks.