LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically calling packed libraries

Solved!
Go to solution

Hi Gang,

 

We want to be able to attached code to our application at run-time.  We can do what we want with LLBs, but would like to use newer technology.  I can statically attache LVLIBPs, But, so far, haven't been able to get dynamic calls to work.

 

Has anybody done this sucessfully?

 

Thanks in Advance,

 

Roger

0 Kudos
Message 1 of 13
(6,562 Views)

Just an update to say that it works using a static reference, but we need to use a dynamic reference.

 

Roger

0 Kudos
Message 2 of 13
(6,538 Views)

Hi Roger,

 

Are you using VI Server in order to dynamically load VIs?  VI Server allows you to dynamically load VIs as needed. Check out the following tutorial:

 

http://zone.ni.com/devzone/cda/tut/p/id/3929

 

This is the general process for dynamically calling code in LabVIEW. Let me know if you have further questions.

 

Cheers

National Instruments
0 Kudos
Message 3 of 13
(6,507 Views)

Hello Aaron,

 

I know how to dynamically call VIs. 
This method also works for calling VIs inside of LLBs.  It does not seem to work for calling VIs inside of packed libraries (.LVLIBP)  As I said in my earlier message, calling the VI inside of the lvlibp using the call by reference node works when using a static reference, but I've not been able to get it to work using the open VI reference VI.  I don't believe the reference can find the top-level vi inside the lvlibp. It returns an Error 7.

 

I've attached example code.  I hope that I've doing something wrong, but I suspect this is a bug. (the web site won't allow me to upload an lvlibp so you'll have to make one)

 

I'll appreciate it if you'll look at my code.

 

Thanks,

 

Roger

 

 

 

0 Kudos
Message 4 of 13
(6,491 Views)

Here's the files in Zipped form...

 

Roger

0 Kudos
Message 5 of 13
(6,489 Views)

Roger,

 

I've looked into this in detail today and can't seem to get it working, just like you.  It looks like it is possible that it is a bug. Right now, it seems that it is not possible to dynamically call a packed library VI using the traditional Call by Reference Node function. I tried several other methods of dynamically calling a packed VI without success.

 

For now, I would stick with another method like statically calling the VIs or using a library other than a packed LVLIBP.  When and if I find a solution for packed libraries, I'll make sure to post the info. Good luck, and thanks for pointing out the issue.

 

Aaron

National Instruments
0 Kudos
Message 6 of 13
(6,478 Views)
Solution
Accepted by topic author Roger Montague

Hi Aaron,

 

Thanks for checking this out!

 

Please make sure it is added to the issues list for a future fix.

 

We are going to implement our need with LLBs for now.  In the future, we may change over to packed libraries, as we prefer that they are un-editable.

 

Thanks, Again!

 

Roger

0 Kudos
Message 7 of 13
(6,463 Views)

You must treat lvlibp file as a folder (without postfix of lvlibp), this is same as llb.

 

i.e. Change "ESM-DMM-156343-AG34401A.lvlibp\Main.vi" to "ESM-DMM-156343-AG34401A\Main.vi" can do work.

0 Kudos
Message 8 of 13
(6,415 Views)

Hello, LiaLiu:

 

Thank you for taking the trouble to look at my code example!

 

I won't have time to verify your solution for a day or so, but I'm sure that'll fix it.

 

Thanks, so much!

 

Roger

0 Kudos
Message 9 of 13
(6,385 Views)
You're welcome.
0 Kudos
Message 10 of 13
(6,380 Views)