LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Array Indexing?

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.

 

 

0 Kudos
Message 1 of 3
(2,822 Views)

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.

Message Edited by Ravens Fan on 04-17-2010 12:40 PM
0 Kudos
Message 2 of 3
(2,816 Views)

Ravens Fan wrote:

How did you get arrowheads to show up at the ends of all of your wires?


 

I believe this is from a toolkit. 
Message Edited by altenbach on 04-17-2010 10:15 AM
0 Kudos
Message 3 of 3
(2,796 Views)