LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace row of 2D array In Place

Hello community,

 

I want to replace an row in 2D-array (at specific row index) by using In Place Element Structure. The 2D array contains a lot of data, so I don't want to use the replace array subset.vi to prevent unnecessary copies.

 

Is there any way to use directly the Add Array Split / Replace Subarrays-functionality of In Place Element Structures? Normally Labview creates a copy of data if I use the replace array subset.vi, is this different by using it in In Place Element Structure?

 

The attachment shows my current solution.

0 Kudos
Message 1 of 3
(4,813 Views)

Replace array subset function will not make a copy the array. If you see a dot with the "Show Buffer Allocation" tool, it's because you are initializing the array as a constant (LabVIEW will not expect to modify it). Because you are using the replace array subset function so array has to be modified, LabVIEW will make a copy of the array. Change the dimension size input of the Initialize array function to a control and the dot(copy) will go away.

Lucian
CLA
0 Kudos
Message 2 of 3
(4,797 Views)

withdrawal of my posting.

 

===========

>Change the dimension size input of the Initialize array function to a control and the dot(copy) will go away.

 

I checked the dot was removed with a contriol in size of array.

 

labmaster.

0 Kudos
Message 3 of 3
(2,953 Views)