01-28-2009 01:24 AM
Hi,
i want to run or skip running a sub vi based on an input. But my requirement is i don want the sub vi to be actually loaded in memory if i don want to run it just to avoid unnecessary usage of memory. how do i achieve this or which is the efficient way to do this.
Regards
Jay
01-28-2009 01:35 AM
Hi Jay,
you can use VI Server to load the VI dynamically and use Call by reference or just the Run method. Search VI Server examples in LabVIEW.
Hope this helps,
Daniel
01-28-2009 02:45 AM
Hi there
if you pass the name of the VI as a string data type the "Open VI reference" function will return a reference only if the VI is already in memory. If you pass the name or the path as a path data type the function will return a reference to the already loaded VI and will load the VI to memory if necessary.
So use just the name of the VI as a string. This will solve your problem.
Refer to the LabVIEW help for the "Open VI reference" function for details.