Signal Conditioning

cancel
Showing results for 
Search instead for 
Did you mean: 

Time difference between 2 signals

Hello thanks for any help offered. 

 

I'm very new to Labview. I have done a few courses now and have setup a state machine testing a number of DC voltages, with great success. however, I have a new problem, we need to measure 2 channels and time when one rises above zero and the other drops to 0v from 5v.  

Chan 1 (400V 50hz sine)

Chan 2 (5V pulse)

Hardware: USB 6001 (no hardware analogue triggering)

 

I've used the trigger and gate function and have adjusted to what I need to see (see image). 

But I simply just want the time difference and not so much the scope image. i can do it just fine on a manual scope 😕  

 

SPRINT_0-1643640310578.png

 

 

0 Kudos
Message 1 of 2
(1,503 Views)

Since you already know the first zero crossing time (0) due to trigger, all it needs is the Basic level trigger detection.vi on the second channel.

you need to set a trigger level for the falling slope .. (or  use it on the sine channel  at zero level and use the difference)

 

this couldn't be zero , so you have to choose a level greater than zero for a robust edge detection.

so depending on your samplerate and the actual fall time of your signal you maybe measure a shorter time.

 

ways for a better estination for the zero level (if that makes sense, ask yourself what actual time you want to know 😉 ) :

- higher sample rate ...

- measure the falling edge twice at two different levels .. that two points define a line .. calculate the zero crossing.

 

- if your two signals have the same frequency (one sine, one square) you can aquire about 20 or more periodes , use the extract single tone information.vi to get both phases  and calculate the phase difference (together with the frequency thats the time difference .. and your square signal is about 180+x deg shiftet (inverted) ).

depending on the ( hopefully constant )  duty cycle of your square the phase difference  can be used to measure that time with a sub sample time resolution 🙂

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 2
(1,479 Views)