LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with shift-register and "insert into array"

The Help file says it "resizes automatically to display index inputs for each dimension in the array." That means that it will create an index input for each dimension of the array, not that it resizes the array. To avoid slowdowns due to memory reallocation issues (especially with large arrays), allocate space for the array outside a loop and use Replace Array Element. The attached VI shows how this can be done.

Lynn
0 Kudos
Message 11 of 13
(969 Views)
Well, the help file does say it resizes the array, and it does.  If you have a 1D array that has 5 elements and call Insert into Array with one element, the output will have 6 elements.  I do agree with you though, Lynn, allocating space outside the loop and using replace array subset is a better way to do this.
0 Kudos
Message 12 of 13
(952 Views)
ok - I understood the problem.
Thanks for your help.
0 Kudos
Message 13 of 13
(921 Views)