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.
10-28-2010 12:26 PM
Hi,
I'm trying to do a subvi that counts any jumps in the data points.
The algorithm:
--construct an array of samples (of the size round(FPS/2))
--Take the mean
--subtract the data points of the array from the mean: difference=absolute(data point-mean).
--compare the difference to the threshold: if difference>=thershold then add 1 to the counter.
The subvi (jump detect) is going to be used in a larger vi, and I need to make sure that it's working. But it's not working now....
While the vi is running and everything is calculated, it doesn't count the jumps which are clearly seen on the plot.
Any ideas what am I doing worng?
Thank you,
Solved! Go to Solution.
10-28-2010 12:30 PM
A couple more attachements....
10-28-2010 03:05 PM
Anyone?
10-29-2010 11:32 AM
The problem exsist in your for loop in your subVI. At this point you are iterating through FPS/2 size of array, and you are only outputing the last value of all of your calculations. Unless the very last value is flagged as a jump, it won't be logged. You can easily fix this by putting shift registers on your for loop, the only issue is doing something with your boolean flag. You could index the boolean values and then do an Or Array function, but that part is up to you.
10-29-2010 12:29 PM
Hi Scott,
Thank you for the corrections, I really appreciate it.