adcpc Posted August 21, 2013 Report Share Posted August 21, 2013 (edited) Hi, I'm wondering how to handle labview code distribution. My team is using teststand as verification tool. Our teststand sequences mainly call our internal labview library. This library is a bunch of VIs versioned with subversion. When the library reaches a good stability point, a tag is created. So we only use tags when writing a test sequence (never the trunk). Here is an example which describes my problem : - User A writes a test sequence for product Y with the latest tag of the library (revision 1000). - In the meantime, User B adds a few VIs and improves some others, comits its changes and creates a new tag (revision 1001). - User A sees that there is a new tag (revision 1001) and overwrites its local library with it. He then creates a test sequence for product Z which runs just fine with the revision 1001. However, he then tries to run the sequence for the product Y but it crashes as one of the VIs has been changed between revision 1000 and 1001. This is what I would like to avoid. The only solution I see for now, is to define the revision at the beggining of the test sequence and have a function that will checkout this version of the library before executing the sequence. Do you see any way of handling this differently ? Thanks, Alex Edited August 21, 2013 by adcpc Quote Link to comment
candidus Posted August 21, 2013 Report Share Posted August 21, 2013 Checkout both revisions into different directories (both directories must not be in LV's search path) and use different project files to avoid conflicts. For example: Directory TestProjectA contains Library_rev1000 and project file TestProjectA.lvproj Directory TestProjectB contains Library_rev1001 and project file TestProjectB.lvproj Another approach could use lvlibs that are named by revision, e.g. Library_rev1000.lvlib and Library_rev1001.lvlib but then your users must relink their tests everytime your library revision changes. I doubt they will like that... Quote Link to comment
adcpc Posted August 23, 2013 Author Report Share Posted August 23, 2013 Hi candidus, The main issue I see with your first solution is that the library has to be copied for each new project. I would like to define a single place where all library revisions are locally stored. I will probably go for the second solution but as you said if someone wants to update his test with a new library revision, they will have to relink each VI call to the new one. Unless there is a way to do it automatically. Quote Link to comment
JamesMc86 Posted August 23, 2013 Report Share Posted August 23, 2013 The problem is a single location can only contain one version. If you want to control the software then you want to decide when the update happens. Even if your software is in separate sub folders you still have to repoint the system.If you have a seperate copy for each project you can just overwrite it with a newer version to upgrade it. It seems this might be a good case for packed project libraries as well. Quote Link to comment
adcpc Posted August 26, 2013 Author Report Share Posted August 26, 2013 I don't need to control when the software update happens. The developers will do it if they need something from the new library version. At the moment, I'm running some tests with the following hierarchy : - Library/ - Library_v1.0.0.1/Library_v1.0.0.1.lvlipb - Library_v1.0.0.2/Library_v1.0.0.2.lvlipb Then my TestStand sequences can call VIs from a single library or from multiple library revisions. This will allow the developer to update a single VI call to the latest library revision without having to relink all VI calls. Having the version in the library name also allows some kind of VIs version tracking used by our TestStand sequences. I just have a single issue with my packed project libraries. I though that an lvlibp would include all dependencies but I've now copied my lvlipb to difference computer which has not access to the lvlib source code and the VIs are displayed as broken. Is there still external VI dependencies when building an lvlibp or do they do include all source code needed (even from vi.lib) ? Thanks Quote Link to comment
candidus Posted August 28, 2013 Report Share Posted August 28, 2013 I don't think that lvlibps include dependencies from vi.lib (haven't verified it, though). The contents of vi.lib should be the same on all machines, missing parts probably indicate missing device drivers or addons. Quote Link to comment
lvb Posted August 30, 2013 Report Share Posted August 30, 2013 Packed project libraries include all dependencies except other packed project libraries and non-LabVIEW files (DLL, text files, ...). So yes, vi.lib is included. What does the error list say on the other computer? Are you attempting to run on the same version of LabVIEW? Quote Link to comment
adcpc Posted September 4, 2013 Author Report Share Posted September 4, 2013 I find out that the error was due to the fact that I manually renamed the lvlibp file and some dependencies were not found anymore. Regarding the sourc lvlib I'm using to create the packed library, I have a single folder added as " Folder (Snapshot)". Is there any way to force a rescan of the folder and add new VIs to the lvlib ? At the moment, I have to remove the folder and all VIs from the lvlib and add them again. Quote Link to comment
lvb Posted September 5, 2013 Report Share Posted September 5, 2013 I find out that the error was due to the fact that I manually renamed the lvlibp file and some dependencies were not found anymore. Regarding the sourc lvlib I'm using to create the packed library, I have a single folder added as " Folder (Snapshot)". Is there any way to force a rescan of the folder and add new VIs to the lvlib ? At the moment, I have to remove the folder and all VIs from the lvlib and add them again. I'm not quite sure what you are asking as all files within a lvlib will be shown. However, you can use auto-populating folders to automatically add new files to a project. Quote Link to comment
adcpc Posted September 23, 2013 Author Report Share Posted September 23, 2013 When creating a lvlib there is no option to add an auto-populated folder to it. The only option is "Folder (Snapshot)". Quote Link to comment
lvb Posted September 24, 2013 Report Share Posted September 24, 2013 When creating a lvlib there is no option to add an auto-populated folder to it. The only option is "Folder (Snapshot)". Understood, but the auto-populating folders can automatically show new files that are not included within the lvlib. Quote Link to comment
adcpc Posted September 27, 2013 Author Report Share Posted September 27, 2013 Understood, but the auto-populating folders can automatically show new files that are not included within the lvlib. How can do this ? I added an auto-populated folder to my project but there is no difference between a folder which is part of my library and one which is not. And this might be useful to know which VIs are not in the library but what the easiest way to add them ? Do I have to manually add each missing folder ? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.