LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replace LabVIEW Library (lvlib) (poss. bug?)

Hi All,
I'm, trying to use lvlibs for shared code. Now i have some issues in version management.
This is what I face:
a library in a construction folder, which is copied (including sub-vi's) to a read-only version specific folder:
-CurrentVerions\workspace
                             -libraryproject.lvproj
                             -library.lvlib
                             \subvi's

 This tree I copy to:
Version xx so this is the end:
Version 2\workspace\
                             -libraryproject.lvproj
                             -library.lvlib
                             \subvi's
 This directory I make read-only.

 Now if I upgrade the library to version 3, I want to upgrade my calling projects as well. So I remove the lvlib reference in the calling project, and inserts the new version (since replace is not an option).
So far so good.
Now if I open A VI with some controls/vi's from the library this is the message I get:
lookup table.lvlib    
- The control expected to be at "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.4\LabVIEW 8.0.1\Workspace\VIs\Defaults.ctl" was loaded from "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.3\LabVIEW 8.0.1\Workspace\VIs\Defaults.ctl".

lookup table.lvlib:Defaults.ctl    
- The library expected to be at "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.3\LabVIEW 8.0.1\Workspace\lookup table.lvlib" was loaded from "N:\Account\NedTrain\ATBEGValidation\Lookup table\08-Delivery\V1.4\LabVIEW 8.0.1\Workspace\lookup table.lvlib".
So what happens, he sees there is a part from the library (lookup table.lvlib) with a control (defaults.ctl) which is updated, but what LV does is take the old version (1.3 over 1.4), in addition the control gets the message that he is binded with the new library (1.4 over 1.3).
So it looks like the control in the VI is path-bound and not namespace-bound.
Does anybody have a solution (not a version control package), or is this like it is supposed to be?
I can manually track down where the control should come from but what if I expand my libraries to 50 or more VI's/controls

Thanks, Ton

PS I got triggered only because i made the folder read-only, I don't want to know what cross-links I have elsewhere Smiley Sad

Message Edited by TonP on 06-14-2006 09:57 AM

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
Message 1 of 4
(3,546 Views)
In addition (and hoping) to raise some interest,

This even prevents me from making a distribution because you have to save very VI for this!

NI told me to rename the old library folders to prevent cross-linking Smiley Mad

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 4
(3,522 Views)

Hi Ton,

This is because LabVIEW identifies each VI based on it's location and the Library (.lvlib) it is part of. (LabVIEW stores a relative path to the VI, the VI knows to which library it belongs). If LabVIEW can't find a VI at that location which is part of the correct Library it will search for it in it's search path. If it still can't find it, it will ask the user for help (Ignore / Browse / Cancel dialog). If you choose to browse and select another VI, All Intanceses of the original VI will be replaced by this VI. LabVIEW does not replace the other references to the Library because it could be that juist one VI was removed from the Library.

You can workaround this issue by using a intermediate library. So you have the following for two versions:

\Library\v1.0.0\driver v1.0.0.lvlib {and files}

\Library\v2.0.0\driver v2.0.0.lvlib {and files}

\Library\Current\driver.lvlib {and current files}

In all the Applications that use this 'driver' library you include the 'driver.lvlib'. If you want to build a new version of this driver you duplicate the v2.0.0 folder in a v3.0.0 folder and when this version is ready for release you copy the library from folder v3.0.0 into the Current renaming it from 'driver v3.0.0.lvlib' to 'driver.lvlib'. This can be done easily using 'Save As' on the Library file or using the 'Save a Copy' method with VI Server (See attached Example).

A down side to this is that all application will be using the new version. Instead of using a current folder you could choose to copy the version you would like to use with a application to the application folder tree and maintain a copy there. This way you can choose per application if and when you upgrade to a new version.

In the attached example

  1. Look at / run the 'Application.vi'. this uses version 1.0.0 for the Driver.lvlib. (in this case the copy is maintained in the applications own folder tree).
  2. Close this VI and it's project file if you opened it.
  3. Open the Replace Library.vi
  4. Select '..\Application\Driver\Driver.lvlib' as the Library to be replaced.
  5. Select '..\Driver Versions\v2.0.0\Driver v2.0.0.lvlib' as the new version of this library.
  6. Run the 'Replace Library.vi'
  7. Look at / run the 'Application.vi' again.

Hope this help.

Karsten

NI

Message Edited by KvZ on 06-23-2006 04:41 PM

Message 3 of 4
(3,497 Views)
Hello Karsten,

thanks for clearing this up. I was hoping that the new lvlib would identify the VI's as part of a library first and then based on the location...

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 4 of 4
(3,482 Views)