LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to create and validate a vi to run or not without actually loading it in memory

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

0 Kudos
Message 1 of 3
(2,559 Views)

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

 

0 Kudos
Message 2 of 3
(2,557 Views)

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.

Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
0 Kudos
Message 3 of 3
(2,542 Views)