LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamic vi not in memory in exe

Hello,

 

I am using LV 2009 SP1.

 

I am trying to build a "Main.vi" into an exe, in which this Main.vi needs to dynamically call two vi "A.vi" and "B.vi" using call by reference node.

 

Therefore in the Build Specs/Source Files, I've put A.vi and B.vi into "always included" before building the exe.

 

I assume this way A.vi and B.vi will be in memory already inside the exe and I can simply wire string constants "A.vi" and "B.vi" to the Open VI reference's vi path input, instead of loading the VI from the hard drive.

 

Unfortunately the loading from memory - string input approach gets me an error message and told me to provide a path to the input to load this VI into memory.

 

It kind of suggests that A.vi and B.vi is not in memory at all even though I've put them inside "always included" during the Build exe setup.

 

I would really want to get the string constant path input working instead of loading these VIs through the hard drive. Based on the above description, I would like to seek some help and determine what can I do to get it working.

 

Any help will be deeply appreciated.

 

Cheers

 

Will

0 Kudos
Message 1 of 7
(4,802 Views)

Just because they are in the executable they are not loaded into memory - that't why it's called dynamic linking. You still have to open a reference to the plugins to get them loaded into memory and to open a reference you need to give a path to the VIs, not just their names.

 

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
(4,792 Views)

Hi,

 

Mike is right with what he explained.  I just wanted to add, that if you're using paths (to the dynamic VI's) that you should be carefull with those.  The path to a VI in development mode is different then in runtime mode.

 

Development : ../Folder/VI

Runtime : ../Application.exe/VI

 

So you will have to check whether you are in development or in runtime.  More info on how to do that can be found here .  You can compare the output of this property to a certain value and determine which kind it is.

Kind regards,

- Bjorn -

Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's 😉
LabVIEW 5.1 - LabVIEW 2012
0 Kudos
Message 3 of 7
(4,775 Views)

 


@ABCPrograms wrote:

Hi,

 

Mike is right with what he explained.  I just wanted to add, that if you're using paths (to the dynamic VI's) that you should be carefull with those.  The path to a VI in development mode is different then in runtime mode.

 

Development : ../Folder/VI

Runtime : ../Application.exe/VI

 

So you will have to check whether you are in development or in runtime.  More info on how to do that can be found here .  You can compare the output of this property to a certain value and determine which kind it is.


 

When you use the modern 2009 and newer application layout (the default unless selecting the 8.x layout in the build options), the path is actually the same in an executable than in the development system, at least in respect to the project file.

 

Another point: If the OP expects the VIs to be in memory anyhow why not include them as static VI reference? Or call them as simple subVI anyhow?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 7
(4,771 Views)

Sorry I have the same problem and I don't understand how to resolve it.

I have a main application main.vi that call other 4 vi when the user want clicking on specific button.

To open the front panel of the selected vi I use the Open VI Reference connected to the Invoke Methods Fp.Open and than Run VI.

To the "vi path" input of Open VI reference I connect the relative path of the vi using the constant "Current vi's path" stripped with the name of the vi to call.

When I create the exe file I put the main.vi in the Startup VIs listbox and the vi to call in the Always Included listbox.

 

When I run the application in development mode, running main.vi, all works fine, when I run main.exe the 4 subpanels never display.

 

Could you explain me how can I resolve the problem (without using acronimous)?

 

I also try to substitute the Open VI Reference with Static VI Reference and connect the output reference to the Fp.Open but it still not working fine.

 

Thanks.

 

Ale

 

0 Kudos
Message 5 of 7
(4,713 Views)

Ok, I don't know what wrong before, now the main.exe works fine.

 

I have tried again the solution using Static VI Reference insted of Open Reference. In the Build option I add the 4 vi that shall be called by main.exe in the Always Included listbox (in Source files category) and now it works fine. Probabily in the previous test I mistake to add those files in the always included list...

 

Ale

Message 6 of 7
(4,702 Views)

Even I have the same problem. Please any one solve this. 

In my application application.exe will ask for the vi to execute. I suppose to give defects_feature_information.vi in that path.

 If that defect_feature_information.vi path is selected from folder its not showing any error.Executing fine.

Problem : I builded my application along with defects_feature_information.vi as  always included. So I suppose to choose path as 

H:/my project/Application.exe/Defects_Feature_Information.vi . In this case it shows error.

 

 

Please anyone help me out. I have included my exe and VI.

 

Note: ProgOpenaVI LV 8.0.vi is top level  vi

Download All
0 Kudos
Message 7 of 7
(4,258 Views)