06-04-2013 05:06 AM
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
06-04-2013 05:44 AM
I dont thinks so, First of all what is the error number. Can you post some snapshot or something.
Thanks
06-04-2013 07:48 AM - edited 06-04-2013 07:51 AM
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.
06-04-2013 07:50 AM
Remaining attached files.
06-06-2013 09:48 AM
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
06-06-2013 10:33 AM
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