LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reuse array data - after being processed

Simple question would be: If i have an array X = [1:1:100];  can i use this array in an operation and give the new values to the same array as in any C code:

 

x = x*2;

 

The problem seems to be that  X being a control array and I can only set the processed value of x*2 to an indicator array.

 

 

0 Kudos
Message 1 of 4
(2,742 Views)

Hello.. 🙂

 

I was wondering that do you want to process 3 dimension array and want to store the new data in the same array or  want the previous data to be stored in the same array.. Can you please explain...?

0 Kudos
Message 2 of 4
(2,738 Views)

LabVIEW handles all the memory management for you. If the compiler determines that a buffer can be re-used for the output, it will do so automatically.

 

To see where new buffers are allocated, have a look at the "Show Buffer Allocations Window" tool.

 

Controls and indicators have their own memory, so don't mistake them for "variables" in a text language sense. LabVIEW gives you all the tools to perform memory intensive operations "in-place".

 

Please be a bit more specific on what you are trying to do. You might also want to read some of the following:

 

Is LabVIEW a general purpose programming language?

 

Ask Dr. VI!: Inside LabVIEW - How the Compiler Works

Message 3 of 4
(2,729 Views)

Hi Junker,

 

I have very little to go on but it sounds like you are trying to use the controls and indicators of LV like named variables in in C. LV handles the buffers for data (the wires) automatically behind the scenes.

 

On the other hand....

 

If you just want to see the results of your calculation in the same control the data started from, then you can use a local to write back to a control.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(2,695 Views)