LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to control the index of the array

im having a 2D 100 x 100 array which i want place a value in some  X x Y place.

Any suggestions ..?

 

-Jagan

 

0 Kudos
Message 1 of 13
(3,039 Views)
Replace Array Subset.
Message 2 of 13
(3,038 Views)

thanks buddy,

The array im using having the row limitation of 4096 and coloumn of 17000 and each cell having the limitation of 32bit value. But every time this much size is not required. how to create memory dynamically for this array.

Or any other option is there in labview.

0 Kudos
Message 3 of 13
(3,021 Views)

Hi jag,

 

an array of ~265MB should be ok for LabView on modern PCs... (as long as you don't create data copies!)

 

Either you create an array that big or you don't. Or you have to work on smaller arrays...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 13
(3,017 Views)

In visual C++ there is an option like grid (which makes the array grow snd shrink dynamically)

Is there any option or tool available here?

0 Kudos
Message 5 of 13
(3,010 Views)

Hi jag,

 

you can use "build array" to "grow" an array and "array subset" to "shrink" it. But both function (may) produce data copies...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 6 of 13
(3,007 Views)

hi GredW,

do you mean data copy is, using a local variable of that array to store the values or what exactly data copy is??

 

-Jagan

0 Kudos
Message 7 of 13
(2,995 Views)

Hi Jagan,

 

no, not "local variables".

LabView has to create data copies in memory for certain operations. You can recognize this by using menu entry Tools->Advanced->Show Buffer Allocations (LV7.1, may be different menu entry in LV8+)...

 

Let's take a typical "build array" operation: You wire a source array and a new element to append to this function. LabView has to create a copy of the source array in a bigger memory space to allow appending of the new element, hence "data copy"/buffer allocation...

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 8 of 13
(2,979 Views)

Hi GredW

Im using lots of local variable, so it may cause the slower exection of my application isn't it? Ok

Im using LabVIEW 7.0 Express, in that how to see that data copies created?

0 Kudos
Message 9 of 13
(2,932 Views)

Hi Jag,

 

using "lots of locals" is considered bad programming style usually Smiley Wink

 

You should find that "show buffer allocations" in the same place in LV7. I'm not sure, but maybe it's not included in base versions...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 13
(2,921 Views)