LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Nested open vi references

I am Loading a VI dynamically in a sub panel with open VI reference. Which in turn calls multiple VIs Dynamically in background with open VI reference function and close them at the end. Also I am using Queues to stop/Exit VIs.

Does nesting open VI reference creates any issues.

0 Kudos
Message 1 of 5
(3,087 Views)

Just set "Auto-Dispose Reference"=True then let LabVIEW clean up after itself.  Really, the compiler is that smart!


"Should be" isn't "Is" -Jay
Message 2 of 5
(3,078 Views)

Thanks for the response Jeff. Does nesting Open VI references to multiple levels violates coding standards of NI guidelines. I was not able find related dcumentation or white paper in NI site. Can somebody help me discover it.

0 Kudos
Message 3 of 5
(3,034 Views)

If you have one managing VI (as it sounds like you have), i'd say it follows the guidelines. It sounds abit more like OOP to me, though. 🙂

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 5
(3,029 Views)

@Yuvish wrote:

Thanks for the response Jeff. Does nesting Open VI references to multiple levels violates coding standards of NI guidelines. I was not able find related dcumentation or white paper in NI site. Can somebody help me discover it.


I know its in one of the LabVIEW core II or III modules, and the concept is covered deep down in the LabVIEW help file (I just can't dig it up right now)

 

If you use the run.vi method autodispose True queues LabVIEW to just handle it.  If you use a call by reference node to call the vi its considered "Polite" to close vi refs that you open at the level you open them.  However, if you open a strict vi ref the refnum falls into that catagory of refnums that always return the same value and if you forget to close it it doesn't really matter.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 5
(3,011 Views)