05-19-2009 06:11 AM
Hello everyone,
I have a question about how to get the start time and duration of the waves i got. The attached figure shows a sketched wave i got . Before the main wave, there's kind of disturbance that i don't need to consider. i just need wave information from start time i marked in the attached file. And after the main wave, there's eco followed ,we don't need to considerthat . Is there any way to know the start time and duration of the waveform. I was really trapped here. Any help is appreciated.
Thanks in advance.
05-19-2009 07:08 AM
Assuming your waveform is stored, for example, on an array, you should act like an oscilloscope: "trigger" the beginning on the first element exceeding a defined threshold.
Some time ago, I had a similar problem, and wrote the attached VI.
To trigger the end, you can edit my VI, adding the condition that a certain number of elements should stay below the threshold.
Regards
05-20-2009 12:06 PM
hello again,
The difficult thing for me is my threshold only can be zero. As i mentioned before , i have a bit disturbance before the main curve, if i use your method, this disturbance will be include in the counting that is what i don't want. I'm really trapped here.
05-21-2009 05:15 AM
Ok but... if you have the full waveform, just set the threshold at half the presumed maximum, and look for the first zero (or local minimum) before the "triggering" event. That will be the starting point.
Similar considerations apply for the ending point.
05-23-2009 02:52 PM
Hello,
Thanks for your reply. But i quite confused how to do with finding first zero before trigeering event. Can u explain a bit in detail.
Thanks a lot
05-25-2009 03:03 AM
The simple attached VI gives the index of the first element equal to zero before element at index "trigger". You can easily change the "= 0" condition to "< given threshold" condition inside the while loop, in case you have to filter some noise.
Regards
05-25-2009 03:48 AM
Hi,
You can use "Search Waveform.vi", using this you can specify the point you want to search with the tolerance
I think this will definitely help you, this vi will give you the time array of wherever it finds the search point in the waveform.
Regards
Santosh