From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
06-14-2012 10:25 AM
Hi ,
In this project im trying to see if two signals are in sync , im doing this by finding and comparing times between maximum values. On here i attached only the sync algorithm im trying to develop where Boolean 1 refers to the maximum value of the first signal and Boolean 2 to the maximum value of the second signal. The goal of the algorithm its to compare times between maximums with a delta t (0,5s).Each time the time difference between the values is less then 0,5 it adds a value to the iteration.When the iteration reaches 4 (i.e.. when the two signals are in sync for 4 periods, i want it to send out a digital value). The problems im having for which i can't find a solution are as following:
I'd like the algorithm to be able to tell if the last value came from boolean 1 or boolean 2 so that its really comparing the time differences between the two signals and not the time difference between two maximums of the same signal). I'd like it to reset the iteration count if the signals are not in sync for 4 consecutive periods i.e.. if for instance they are in sync in two periods and the count reaches 2 but after that it passes two or more periods of the signals without them respecting the 0,5 s max time difference the count should reset and start again.
I've attached the algorithm.
I hope I was clear about my doubts as English is not my native language.
Thanks for the attention.
Best Regards,
06-14-2012 03:15 PM
Hi Jose
I've built a little statemachine to this, but it builds no arrays and stuff, so if you need it you'll have to modify the VI.
Regards,
Mariana.
06-18-2012 08:55 AM
Hi Mariana,
Thanks a lot for the fast response. I just have one final request. I posted this on LabVIEW 2010 version but on my personal computer i onyl have the 2009 version and i wont be able to get back to the computer with the newer version that soon, so , having said that, can u please save your file to the 2009 version and re send it to me? Thank you
José Alves
06-18-2012 10:37 AM
Attached