03-27-2015 10:42 AM
Hello all !
I am quite confused ... I have acquired a waveform signal from a NI scope and the result is presented in the graph above, everything seems perfect.
Using the "Transition Measurement.vi", I would like to extract the following information out of the waveform signal : start time and end time of an edge ... And here come troubles !
The start time and the end time of an edge are the same ! (difference = 0) and the start time is even smaller than the very first element of the time array I extracted from the waveform ! (Gloups !).
However, the transition duration, which is supposed to be calculated as I did with the start and end time, is different and seems relevant ! How is this possible ? Has anyone an idea of where I did a huge mistake ?
Thanks for your help and have a nice week-end !
Geoffrey
03-27-2015 02:59 PM
I can't take a look at the VI that you attached since it was saved in LV 2014 and I only have 2013; if you save it for 2013 and reattach, I could take a look.
However, it looks like you may not have provided valid reference levels for how the Transition Measurements VI identifies edges, and it identified the first point as being an edge.
03-27-2015 03:36 PM
For something as simple as the waveform you showed, I would just write some LabVIEW code that "does what I ask it to do", meaning it carries out an algorithm that I determine, can test, and can understand. I have no idea what NI's "Transition Measurements VI" does, even after reading the Help, but it certainly is doing something complex and mysterious.
I do know, however, why your transition time appears to be zero -- it is an artifact of the way it is being reported. Your sampling rate seems to be 250MHz (wow!), or a point every 0.000000004 seconds. Suppose the transition was really fast, say 2 points wide = 0.000000008 seconds. That is less than the number of digits of precision in Start Time and End Time, so their difference could well be (rounded to) 0.
If you did this yourself, you would presumably compute the transition in terms of array indices (i.e. "starts at point 7, finishes at point 9"), would subtract (9-7 = 2) and multiply by the sampling period (4E-9) and would get the "correct answer" (8E-9) displayed correctly.
Bob Schor
03-30-2015 12:52 AM
Hello !
Thanks for your answer. I was considering this option indeed, however I would like to understand where what goes wrong with my use of this vi ^^' and since the end and start time are exactly the same until the nanosecond, I am not sure it is due to a rounding error ... I rather think a single point is considered as end time and start time at the same time ... But can't figure why
Anyway, thanks for your help
03-30-2015 06:17 AM
They are not exactly the same to the nanosecond -- they are exactly the same to the 10-nanoseconds. Since 8<10, if they differ by 8 (or fewer) nanoseconds, they will be reported as "the same" because there is not sufficient precision in the numbers.
BS
03-30-2015 06:27 AM
Indeed ! You are totally right ! Thank you for this first light !
There is still a mystery about the way this block performs the transition time calculation (even with interpolation, it seems intricate with start time and end time seen as the same time ...). Anyway, I will do it my self in a home made loop
Thank you for your help !