04-17-2010 11:31 AM
Ok, we are trying to get a velocity reading based on a counter, that we have hooked up to a 6008 DAQ. The Problem is that when we differentiate discrete points, our data is tremendously flawed. We feel that this is because there are spikes in the data. We need to smooth it out, and we have tried using a fourth order central difference, but have had no luck with that. We are considering using a rolling average of the current array index and the previous two points to try and combat sudden spikes, however we cannot get the array to properly pass the data to our averager.
Do any of you have insight into how this can be implemented? it is for a much larger program that involves simulation loops, case structures, event structures, etc, so simple solutions are best. We considered using Savitzky-Grolay but no luck there.
I have attached a picture of our current VI setup
Thank you.
04-17-2010 11:36 AM - edited 04-17-2010 11:40 AM
It would probably be better to attach your VI rather than just a screenshot. Where is the "averager" you are talking about?
How did you get arrowheads to show up at the ends of all of your wires?
One problem I see is that you take a scalar value and build it into a 1-D array. That means you have a 1-D array with exactly 1 element. But your proceed to Index the array to get the index determined by "counter" (who knows what that value is) and also two times with identical code, the element at the "counter" -1 index. A 1-D array with 1 element only has an element at index 0. There is nothing at index -1.
04-17-2010 12:08 PM - last edited on 03-20-2024 02:12 PM by Content Cleaner
Ravens Fan wrote:
How did you get arrowheads to show up at the ends of all of your wires?