LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI still in memory -please help

Hi

I have used this method to close a vi and open another another one with a click but the problem is after closing the vi(inverting.vi) it remain still in memory so when I want to open it again I get a message somthing like it is in use or it is in memory.Would you please help me how can I close th vi properly or is there and easier way to close one vi and open another one at the same time

0 Kudos
Message 1 of 10
(2,863 Views)

All you do is close the front panel of the VI. Unless it detects this itself and stops itself it will still be running in the background.

 

Without seeing its code it is difficult to say if simply aborting it is permissible, and whether this will unload it from memory. The best would be to send it a notification to stop itself gracefully.

0 Kudos
Message 2 of 10
(2,850 Views)

Hello En99

 

I am an Application Engineer here at National Instruments and as I understand you are having problems with loading and closing vi's and their references. Here are some resources that may help you, if you still have problems, please get in touch and I will support you further.

 

How Can I Programmatically Close All Open SubVI Front Panels Without Closing Select VI Front Panels? - http://digital.ni.com/public.nsf/allkb/353A696A3F393D9B86256E8B007A2912?OpenDocument

How Do I Close a Dynamically Called VI's Front Panel? - http://digital.ni.com/public.nsf/allkb/987B2026B41BD39786256CF800032E8C?OpenDocument

Programmatically Opening and Closing a VI Within Another VI - http://digital.ni.com/public.nsf/allkb/9282BA6C907DF5B2862572480069E570?OpenDocument

 

Please feel free to ask any further questions.

 

Regards

Stephanie L
Applications Engineer
National Instruments UK and Ireland
0 Kudos
Message 3 of 10
(2,815 Views)

From the help: on open VI reference

If you do not close this reference, it closes automatically after the top-level VI associated with this function executes. However, it is good practice to conserve the resources involved in maintaining the connection by using the Close Reference function to close the reference when you finish using it.

 

In the vi you opened you set "auto-dispose=T" so the non-inverting vi will leave memory when the vi exits.  but you open a reference to inverting vi and close the FP BUT inverting vi remains in memory since the reference to the vi does not close until the vi in your jpeg leaves memory.

 

Put a close reference after the FP.close method.


"Should be" isn't "Is" -Jay
0 Kudos
Message 4 of 10
(2,805 Views)

So If I open dynamically subvi how described below:

 

 

and when  close subvi how described here

 

 

Can I free up memory these actions after using dynamically subvi?

 

0 Kudos
Message 5 of 10
(2,740 Views)

so I close subvi after using, this code I putted into last frame of subvi

0 Kudos
Message 6 of 10
(2,739 Views)

As a note it's recommended in the help file to use Invoke node: FP.open instead of the property node as you do.

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 10
(2,725 Views)

Dear Yamaeda

 

Please help me to evaluate my short example (see attachment) for 24/7's possibility and from point of view of unclosed references. In these subvi's I'm having plan to place databases subvi's. Can I run at once 5 subvi's and in every one there is event structure.

 

You are professional - your 4000 vi's are "for nothing does not pass"    8-)    I'm very impressed

0 Kudos
Message 8 of 10
(2,714 Views)

I didn't write all 4000 myself, it's an inherited platform with additions. 🙂

 

You overcomplicate some things and  miss a couple of others. E.g. you have no way of stopping your sub vi's, using Abort is a BAD solution. You open and close the referrence each time, and also in the sub vi's. That's not necessary.

 

I've included a somewhat cleaned example, i use a global to stop the sub-vi's. It can be cleaned more.

 

Note that your sub vi's are running constantly, you only close/hide the front panel.

 

/Y 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 9 of 10
(2,693 Views)

Attached as LV9

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 10 of 10
(2,669 Views)