From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Propert nodes using references in subVIs

Does passing a reference to a control in the master VI to a subVI for use of changing the control via property nodes cause the subVI front panel to load in memory? I would think that it would not since the property node does not refer to a control on the front panel of the subVI.
0 Kudos
Message 1 of 6
(2,818 Views)

Hi,

The front panel of the subVI will be loaded into memory  regardless of whether you use any of the VI front panel controls.

 

See Front Panel Property in the LabVIEW Help.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 6
(2,801 Views)

Hi there,

the FP of the Sub-VI is NOT loaded into memory as long as you don't need any controls on the FP during runtime. i created a Top-level and a Sub-VI as you described (see attachment). when building an executable you can remove the FP of the Sub-VI from the exe and it will still work. 

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 3 of 6
(2,786 Views)

Hi,

Thats true, but if you use a node in the subVI, then it will probably load the front panel of the subVI,

for the labview help manual

"

The VI also loads the code and data space of its subVIs into memory. Under certain circumstances, the front panel of some subVIs might be loaded into memory as well. For example, this can occur if the subVI uses Property Nodes, because Property Nodes manipulate state information for front panel controls.

"

Because one of the controls is a reference to a control on the front panel you probably will use a Property Node in the subVI.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 4 of 6
(2,773 Views)

hi there

"..For example, this can occur if the subVI uses Property Nodes, because Property Nodes manipulate state information for front panel controls..."

i think that's true for the front panel that holds the control from which you call properties. the sub-VI calls a property of the control on the Top-Level, NOT of the reference control on the FP of the Sub-VI. rename the executable i posted in the zipfile to *.llb and open it in explorer. then open the Sub-VI and you'll see that the FP is not part of the executable anymore. so it can't be loaded at all.

if you call a property of the reference control you can't remove the frontpanel in the VI-settings any more (see attachment), because now you refer to a control of the Sub-VIs FP.

   

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 5 of 6
(2,767 Views)
Thanks Chris. That's what I thought. I figured since the control isn't on the FP of the subVI, it must not need to load the FP, but then I got worried realizing the memory intensive implications it would have on my software if it did.
0 Kudos
Message 6 of 6
(2,745 Views)