09-20-2013 01:30 PM
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.
09-20-2013 01:53 PM
Just set "Auto-Dispose Reference"=True then let LabVIEW clean up after itself. Really, the compiler is that smart!
09-25-2013 07:18 AM
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.
09-25-2013 08:07 AM
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
09-25-2013 02:49 PM
@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.