LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VI Runner : How to load required VIs before execution ?

Hi all,

 

I would like to create an executable which is able to dynamically run a VI. This is done with the "Run VI" invoke method. However, it doesn't work because it is not able to find the required SubVIs. I was able to fix it by adding a few paths in the "viSeachPath" file of the executable ini file. But it takes a lot of time to find all the VIs in the specified paths.

 

Is there any way to optimize this ? I've seen that there is a method to get the dependencies of a VI. Would it be possible to use this method, then pre-load all dependencies and finally run the VI ?

 

Thanks,

Alex

0 Kudos
Message 1 of 7
(2,946 Views)

All you really need to worrry about is finding the VI you want to call dynamically. For that I have found it helpful to always have such plugin VIs always located in a known location like a "Plugins" subdirectory in the application directory. Alternately, you could create entries in the application's ini file or a table in a database that contains the path to each plugin.

 

Are you planning to have the dynamically called VIs included in the executable that will be running them? That structure offers some other alternatives, as well as new issues to address.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(2,941 Views)

The dynamically called VIs won't be included in the executable.

 

The path to dynamically called VIs is given by the user so that should not be a problem.

 

I'm trying to dynamically run a VI which uses a DAQ board and thus uses some DAQmx VIs. However, it fails to find all DAQmx VIs as long as I don't write the corresponding path in the executable ini file.

0 Kudos
Message 3 of 7
(2,933 Views)

when you build your program (not the installer) go to source files. Add in the dynamic vi into Always include window. The vi will now be included into the executable. Be careful how you access the dynamic VI. In the development, it is in one directory but when you generate the executable, it will be in the executable.

0 Kudos
Message 4 of 7
(2,921 Views)

Thanks for your reply.

 

In fact, I don't want to include the dynamic VIs into the executable.

 

I've seen that when I run my executable, it is not able to find any VI which in the vi.lib folder. It seems that the runtime can't translate the <vilib> symbolic path to "C:\Program Files (x86)\National Instruments\LabVIEW 2009\vi.lib.

 

Is it a normal behavior ?

 

Thanks,

Alex

0 Kudos
Message 5 of 7
(2,907 Views)
I would say so. There is no need for the runtime engine to know where the development libraries are.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 7
(2,898 Views)

Is there any way to save a VI with an absolute path instead of a symbolic path ?

 

Thanks,

Alex

0 Kudos
Message 7 of 7
(2,888 Views)