it turns out there are 3 or 4 vis in the example i download, linked in above.
one of the examples, called phase measurement, will correct for this type of shifting of the range [-360 to 360], the one called "phase difference" wont and will give out phase shifts greather then 360..
anyway, maybe that will help someone in the future more then the typical upgrade answers..
Im still having trouble measuring phase shift.
I did use the dual channel spectral measurement vi that was mentioned above.
I made a movie of what the signal looks, how the phase shift bumps, and also the visual code used
www.engr.uconn.edu/~jmacione/output.avi (50mb, so might want to right click and save to disk)
Im at a loss here on how to get a stable measurment
dahhh, okay, i think i finally figured out what is going on here, and i think im just being somewhat dumb or maybe just assuming to much.
Looking at matts example helped a lot as i see why.
with one of the old
With the new dual channel measurement (or the example you posted), when phase is measured, there is an inflection point at some angle of phase difference.. The way your example works (and the express vi) is with an inflection at 180 degrees. So, lets imagine we have a measurement of phase shift that is 178 degrees, as this difference increases, the next is 179, and then 180.. Now as it continues to move, the next phase measurement will not bet 181 but instead -179. As the signal continues to move in the same direction, its then 178, 177, 176.. So there is an inflection point at 180 degrees with two sinusoids, in simple terms, its because the phase difference of one sinusoid to the other has shifted and is now being measured in reference to the next peak in the series.
Its troubling for measurements are if you turn on a machine that is measuring phase, and it happens to be right near -/+180, it can cross that boundary often, creating substantial noise. Also, that for certain types of peak detection, such as for motion, its desirable to have a larger range such as [-360,360] which should be theoretically possible (like the first vi we used) but i guess [-720, 720] could be done too assuming there is enough difference between the peaks. It would have been awesome to have a VI that measures peak movement outward to infinity. We were originally using a VI that calculated out these larger differences, think it was doing the calcs in frequency domain (imaginary nums) rather then cross correlation like the example.
I think for now, we are going to have to work inside the range [-180,180] and initialize our hardware to 0 phase so we dont start near the inflection point and see if that works.