02-09-2009 11:41 AM
hi every one
i have NI-USB-6212 DAQ module, and i am aquiring two analog signals i.e one from a function generator a periodic signal and one from a pressure sensor, can anybody have idea how do i calculate time delay between these two signals by using any of the Labview Vis or functions, i have tried to find some but still find my self unlucky.
looking forward for kind suggestions
thanks
Hussain
Research Student
02-11-2009 08:58 AM
Hi Hussain
Have you tried the examples in the Example Finder under Hardware Input an Output -> DAQmx ->Counter Measurments -> Two Signal Edge Separation?
Regards
David
NISW
02-17-2009 09:17 AM
i have tried that before but my signals are analog sine wave and i have two signals to compair in one graph and also want to put indication of that delay in terms of indicator that shows the delay in milliseconds,
any possiblity to do this stuff on analog signal.
thanks
02-17-2009 09:27 AM - edited 02-17-2009 09:34 AM
Have you looked at the Basic Level Trigger Detection function? You can use one function for each waveform. Use 'time' as a location mode and subtract one trigger location from the other.
Also, since you are acquiring the signals with a single DAQ card that muxes the input signals, you will have to know the inter-channel delay in order to accurately calculate the real time delay. If the delay is small, you will be much better off using the counter. You can still use the analog inputs to display the signals.
02-17-2009 09:56 AM
can u plz explain it a bit more to me, i am getting ur point, would you mind if i ask few more things to you?
how do i look for inter-channel delay,because i really want to measure realtime delay between both analog signals should i have to look up to datasheet of my DAQ device as i am using Ni USB 6212?
it really sound me a good idea to use counter as well but i never use such setup could plz explain how can i make a counter setup with my DAQ device? is there any hardware involve to get counter input ?
iwaiting to your kind response in the mean while i am trying to use this Basic level trigger detection as u mentioned in ur post
thanks for the replies
02-17-2009 10:49 AM
You can see this for information on obtaining/setting the interchannel delay.
I'm not sure I understand the other part of your question. In response to David's suggestion to use the Two Edge Separation examples, you said 'i have tried that before'. If that's not true, look at the block dieagram of one of the examples. There is a reference there to how to use a counter and how to make the connections. The counter expects TTL signals I believe and you only have an option for rising or falling edge in the example.
02-17-2009 10:15 PM
If you need to measure the phase difference of two steady state sine waves, there are a few ways to do it.
There are a few FFT or waveform functions that would do it. They would give you the phase of each sine wave, and you could subtract the values. Use the frequency to figure out the time delay.
Convolution will do it. The convolution will have a peak at the same number of points as the number of samples of delay. You can use peak detection to get the fraction between the two points.
There are fancier ways to do it, but these should work. I would probably try to measure the frequency and phase of the two waveform segments. Subtract the phases, then convert the difference to time using the frequency.
Bruce
02-18-2009 12:23 PM
hi realy appreciate you people to have such a nice suggestions to me, right now i am trying all the options i got from here,
can u plz check this image and suggest me how could i display this delay in seconds,
as i mention above i need to calculate the time delay between two signals so what i understand is that if i use this basic level trigger i could get my required time delay, do you agree with this approach more over should i have to put the trigger function outside the while loop or is it Ok inside?
i shall be gratefull to have a response from you experts,
thanks
02-18-2009 12:59 PM
02-19-2009 08:26 AM
hi
i have converted it to now an array indicator but still have the same problem. can u plz have a look on my vi i need to read this difference of time delay between both signals, am i doing right? the vi is attached,
thanks