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.

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,944 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,935 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,895 Views)

That should be round down, not round to nearest.

Message 4 of 5
(1,875 Views)

@RavensFan wrote:

That should be round down, not round to nearest.


Thanks for catching that

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