LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Use of control references within a loop

I use subVI's within a loop that process controls on the front panel. I have created references to those controls and pass them to the subVI's. I have 2 questions about them.

1) Does having the reference inside the loop have any memory impact (i.e. does it re-initialize the reference each iteration)? It is much cleaner to have the references inside the loop (less wiring).

2) Does a reference to a control obtained by right-clicking the control and selecting Create->Reference need to be closed?

Thanks
Bill
0 Kudos
Message 1 of 3
(2,634 Views)
Hi Sweet William,

1) The control reference is a constant so it makes no difference if it is inside the loop.
2) Because the control reference is a constant the value doesn't change and therefore, closing the reference is not necessary.
See the attached link for more information on Control References.

http://www.ni.com/devzone/lvzone/dr_vi_archived4.htm

Regards,

Chad Evans
0 Kudos
Message 2 of 3
(2,634 Views)
Thanks Chad

This is what I suspected and it is good to have it confirmed.

Thanks
Bill
0 Kudos
Message 3 of 3
(2,634 Views)