LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

local variable of a reference to a user defined control - how much memory it takes

Helo Everybody
I have created my own control and I a referene to it. I also need to create some local variables linked to this reference.
The question is how much memory the local variable of a reference to a control takes?
thanks in advance
Pawel
0 Kudos
Message 1 of 5
(3,040 Views)
It varies ased on the control. The bigger the control the more memory. My question would be, Why the locals? Why not wire the reference to the various points?
0 Kudos
Message 2 of 5
(3,040 Views)
Hi,
I can wire the reference to a various point, but it looks more clearly in my example when I use locals. The question was meant to estimate the advantages of good looking vi and memory usage vs. the bed looking vi and low memory costs.
kind regards
Pawel
0 Kudos
Message 3 of 5
(3,040 Views)

Pawel,
We highly recommend avoiding using the local variables just for the esthetic reasons. It is better to use wires.
Overusing local variables can significantly increase memory usage. Every time a local variable is read, a new copy of its data space in memory is used. If you, for example, read the local in a loop, you can eventually run out of memory.

Once you are done editing your VI, you will not have to look at the wires on the block diagram, but you will always want to manage your computer memory efficiently.

Here are some documents on local variable that you may find useful:

LabVIEW Performance and Memory Management
http://pong.ni.com/public.nsf/websearch/74ECB57D3C6DF2CE86256BE30074EC47?OpenDocument 

Zvezdana S.
National Instruments

0 Kudos
Message 4 of 5
(3,040 Views)
Hello Zvezdana
As always you provide with the very convincing replay. Thank you for that.
I also agree that once I finishmy program I will not look at the diagram. On the other hand, my program is a part of a big project and it will be continuously developped and the clear look is also important.
But on the other hand, while I consider that my locals is a reference to a quite big cluster (GOOP) so I must reconsider using locals. This was the purpouse of my question, to make sure I do it right. I think you have given me the answer.
kind regards
Pawel
0 Kudos
Message 5 of 5
(3,040 Views)