LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

array management

hey
How do you get a array to re-fill. im filling a 1d array with 10 elements, i want it to go back to element 0 and re-fill the 10 elements with new values. the array is inside a while loop, and with each iteration of the loop a new value is generayed and sent to the array.
thanks.
Brendan
0 Kudos
Message 1 of 3
(2,216 Views)
Hello Brendan,

you will have to make your own logic!
You could take the loop counter (i) and put that on a quotient/remainder with divisor 10. So you get an index to the array in the range of 0 to 9...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 3
(2,211 Views)
Hi Brendan

In addition to what GerdW already mentioned (which is absolutely right), use the "Replace Array Subset"-Function from the array-palette to replace the elements.

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
Message 3 of 3
(2,206 Views)