04-01-2010 09:45 AM
I am trying to find and compare every nth previous element of my data with respect to the current value. For example, I wanted to know the value of every 100th previous element with my current value : [X(i)-X(i-100)=?]. I know that I can do that by adding more shift register elements in the loop, but having 1000 of the shift register in the loop, seems to be not efficient. Thus, I am seeking suggestion or ideas , where instead of having to add 100 of shift register, I will have a numerical input that allows me to select the number of previous elements that i wanted to compare.
thanks in advance
04-01-2010 09:49 AM
Does each iteration generate only a single value?
I suggest you to create an array with 100 elements and use this as a "ring buffer". Store the whole array in a single shift register.
hope this helps,
Norbert
04-01-2010 10:04 AM
04-01-2010 10:09 AM
This is one of those times when the shift register is just not enough. In this case You really need a feedback node. Set it for a 100 delay and yes, you can initialize the node with an array to initialize the first 100 values.
04-01-2010 01:09 PM
Jeff- unfortunately, I am still with LabView 8.6.1 , else that will be the solution for what I wanted to do
Norbert- do you have a simple example on what you suggested ? like creating 100 element in one shift register as this is similiar to the new feedback note that jeff was talking about that I am unsure how to replica it in 8.6.1
Mark - yes I need to store the data. I thought about that and tried it before.
Thanks all..
04-01-2010 03:08 PM
04-01-2010 03:21 PM
This is easy. Just add 100 elements to the loop.
April Fools. Just Kidding.
I though it was funny.
04-01-2010 09:40 PM
LabVIEW 8.6.1--
Best April Fools Joke EVER
(Could you convert this VI from LV 1.0?)
04-02-2010 07:53 AM - edited 04-02-2010 07:54 AM
Hi CW81,
I think its something along these lines you are after. The current version of data (i) is subtracted from the past 100th stored version of i. The past 100th stored version is then overwritten by the current version. This cycles indefinately. In this version, until the first 100 iterations have been stored in the array the current value of i will be subtracted from 0.
Hope this helps.
Lucither
04-12-2010 08:59 AM
Thanks every one for all the help. I upgraded my LabView to 2009, and it has been working fine using the feedback note.