ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Direct data VS local variables

Solved!
Go to solution

Hey!

 

I'm doing LV Core 3 and hope someone enlighten me some more.. (Excersie 7-2 Solution more around 1:50 in the video to be more specific)

 

According to this module an indicator that is updated very frequently should be connected with direct data and not a local variable. Searching the help it tells me that local variables make copies of the data.

 

Is it somewhat like this:

1. I have an indicator A that is "coupled" to memory postion X.

2. If I write indicator A directly it writes directly to memory postion X.

3. If I instead would write via an local variable.. Would it first create a copy of the data to be written to the indicator in memory postion Y and then copy it to memory position X? 

 

Thanks

Peter

0 Kudos
Message 1 of 2
(2,919 Views)
Solution
Accepted by topic author ByDesign

Yes thats right. 

Now imagine if you have a very large array ( and array elements should be contigious in memory ).

the first memory manager needs to find a place in memory where it can hold the array and now you are have one more memory location occupied per local variable.

0 Kudos
Message 2 of 2
(2,916 Views)