LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic calls from executable

Hi all,

 

I used to have LabVIEW application, as executable, which does dynamic calls to any VI. Until now it was done and built with LV2009 and worked fine as long as the vi.lib folder was copied to same of folder than the executable (this was needed for dependencies).

 

I've now moved to LV2012 and my application does not work anymore. It seems that dynamically loading any VI in vi.lib which calls an LLB is not possible and leads to an error. Is this known ? Is it a bug or a new limitation in LV2012 ?

 

Thanks,

Alex

0 Kudos
Message 1 of 6
(3,062 Views)

I dont thinks so, First of all what is the error number. Can you post some snapshot or something.

 

Thanks

--------------------------------------------------------------------------------------------------------
Kudos are always welcome if you got solution to some extent.

I need my difficulties because they are necessary to enjoy my success.
--Ranjeet
0 Kudos
Message 2 of 6
(3,051 Views)

Here is how to reproduce this issue :

 

First, open the attached GetVIDependencies.vi in the LV2012 development environment. In the "VI Patch" field, enter the path of the attached "Test.vi" and then execute the VI.

 

You should get 38 found dependencies and 0 missing. Then do the same with the exe version of GetVIDependencies. You should get 1 dependency which is missing. This is normal because the runtime does not know where <vilib> is placed. If you place the exe in the LabVIEW.exe directory (where vilib stands), you will get the same result.

 

Then, if you have LV2009, try the same with the 2009 executable version and "Test_LV2009.vi". It will work as soon as you place the executable in the LabVIEW.exe (2009) folder, no matter where "Test_LV2009.vi" is placed.

Download All
0 Kudos
Message 3 of 6
(3,042 Views)

Remaining attached files.

0 Kudos
Message 4 of 6
(3,038 Views)

Hi Alex,

just copying vi.lib to the application's directory is not the preferred way to make sure dependencies are found by an executable.

In order to make sure all dependencies required for a VI to run are present when calling it dynamically, please build a source distribution for the VI.

In the source distribution configuration dialog there is an option to include files from vi.lib in the source distribution.

 

Also have a look at the following knowledgebase:

How Can I Call a VI Dynamically from an Executable Without Including Those VIs in the Build?

 

Regards,

  Georg

0 Kudos
Message 5 of 6
(2,999 Views)

Hi Gerog,

 

Thanks for your reply. I tried to do a test with a source distribution and it worked fine.

 

I've seen that the source distribution does not include any LLB. All required VIs are extracted out of the LLB. This makes me think that dynamic calls do not support vi.lib LLBs anymore (it used to work on LV2009).

 

I'm a not a huge fan of this solution as it requires a source distribution for each dynamically called VI. As I have tens (soon hundreds) of dynamically called VIs, I will have to create a lot of source distributions, probably having many copies of the same VI in the different source distribution. The source distribution for my simple test (a VI calling "Basic Averaged DC-RMS.vi") already includes 21 VIs, 1 DLL, 1 control, and 4 LVLIBs with a total site of 1.67 MB so it could quickly lead to a huge amount of disk space.

 

Is there a known reason for the unspported dynamic calls of vi.lib LLBs ? Or maybe this not only limited to vi.lib LLBs but to all LLBs.

 

Regards,

Alex

0 Kudos
Message 6 of 6
(2,991 Views)