LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform duration

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.

 

0 Kudos
Message 1 of 7
(3,301 Views)

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

 

0 Kudos
Message 2 of 7
(3,289 Views)

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. Smiley Sad

0 Kudos
Message 3 of 7
(3,258 Views)

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.

0 Kudos
Message 4 of 7
(3,240 Views)

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

 

0 Kudos
Message 5 of 7
(3,219 Views)

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

0 Kudos
Message 6 of 7
(3,193 Views)

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

0 Kudos
Message 7 of 7
(3,191 Views)