LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace Array subset resetting

Solved!
Go to solution

I have a set of random number values streaming in with a corresponding index value. The VI finds the index and places this value into an array using replace array subset. However, each time a new value comes in, the array only contains that value and does not have the old values. I want the array to save the last values from each index and only replace them when a new one comes in. The final output should be a 1x10 array with values contsantly changing

0 Kudos
Message 1 of 5
(1,948 Views)
Solution
Accepted by topic author arob

You can delete the for loop and put the shift registers on the while loop.

 

Message 2 of 5
(1,939 Views)

The VI posted makes little sense. You will never get a 0 index because you are rounding up. An index of 1 will never be replaced. See below for an improvement.

 

mcduff

 

snip.png

0 Kudos
Message 3 of 5
(1,899 Views)

That should be round down, not round to nearest.

Message 4 of 5
(1,879 Views)

@RavensFan wrote:

That should be round down, not round to nearest.


Thanks for catching that

0 Kudos
Message 5 of 5
(1,876 Views)