LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reentrant VIs and SubPanel

If the VI loaded in subpanel control contains reentrant SubVI, then multiple
instances of that SubVI shows in hierarchy (remain in memory).


For example:
1. Modify the "plugin3.vi" found in "\LabVIEW
7.0\examples\general\controls\subpanel.llb" to call Time Delay (Express VI).
2. Then run the "viewer.vi".

3. Select different VIs to show in subpanel control. After few calls to
"plugin3.vi" there will be multiple instances of Time Delay in hierarchy
window.



How to prevent this?


Thank you


Bojan








[Attachment clip_image001.gif, see below]


[Attachment clip_image002.gif, see below]
Download All
0 Kudos
Message 1 of 5
(3,627 Views)
Reentrant means that everytime the VI is placed, LabVIEW will make a copy of the VI in memory. (This is useful if your VI uses unitialized shift registers for data storage.) I do not believe it is possible to remove the extra copies of the VI from the heirarchy. VI heirarchy is not open sources so you cannot edit it and there are no settings (other than setting non reenterant) that will removed the extra copies from memory.
0 Kudos
Message 2 of 5
(3,627 Views)
"Jeremy Braden" wrote in message
news:506500000005000000FD540100-1075825507000@exchange.ni.com...
> Reentrant means that everytime the VI is placed, LabVIEW will make a
> copy of the VI in memory. (This is useful if your VI uses unitialized
> shift registers for data storage.)

LabVIEW should clear previous VI from memory when another VI is loaded in
subpanel control.

Bojan
0 Kudos
Message 3 of 5
(3,627 Views)
If you want to give feedback to NI about product improvement, go to the main web page (www.ni.com). Select "Contact NI" and choose product feedback. These suggestions go straight to the NI managers--the people that can make suggestions happen."
0 Kudos
Message 4 of 5
(3,627 Views)
Hello Bojan,

Thank you for contacting National Instruments.

You seem to be having a problem with multiple instances of the Time Delay Express VI appearing in the VI hierarchy.

I was not able to reproduce the same behavior here on my system using the instructions you provided. After looking at your image002.gif, it seems that you have multiple copies of the Time Delay Express VI (located in /LabVIEW 7.0/vi.lib/express/express execution control) opened, since each one appears as a top level VI in the hierarchy.

If you open a blank VI and place a Time Delay Express VI in a For loop, you will notice that it does not place multiple instances of the express VI in the hierarchy.

I hope this solves your problem. If you have any further questions, let me
know.

Matthew C
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,627 Views)