07-27-2016 06:58 AM
Hi.
I am having a big problem the paths regarding libraries in my project. When I go to build my application Labview informs me that some source files are missing and to look for the missing items. In the project explorer there are two versions of the driver library and neither have the correct path to where the folder actually is and have conflictions and not loaded warnings.
So I drag the actual library from windows explorer into labview project and remove the other ones from the project. Then I go to find missing items and click on on of the vi's which has the wrong path. I right click and select run to try and change the path but theis generates an instrument library in dependancies that are locked and I cannot remove from my project. This is in the upper red circle.
How can I remove the files with the incorrect paths and leave the correct ones. This does seem like a trivial task but Labview keeps forcing these old nonixisting paths which is really annoying.
Thanks,
Mark.
07-27-2016 07:08 AM
Not sure why they are locked, but for instrument drivers, you either need to leave them in instr.lib or you need to copy the entire library into your project directory. The lvlib means that all of the associated files must be there.
07-27-2016 07:20 AM
Are you sure all the SubVis that you use on your project are calling the same library?
could be that you have subvi A calling to library on location X and SubviB calling location Y
Also you could try opening the labview project file as a txt file and mess with the xml and delete stuff from there
07-27-2016 07:22 AM
Take for example the second highlighted one below. That folder does not even exist so where is LV getting it from. Is it possible to somehow delete this from the project or change the path?
Mark.
07-28-2016 09:10 AM
I just rebuilt the project instead. It solved the problem so I shouldnt of had to in the first place.
07-28-2016 10:26 AM
@MarkGreally wrote:Take for example the second highlighted one below. That folder does not even exist so where is LV getting it from. Is it possible to somehow delete this from the project or change the path?
Mark.
I believe that when you use the instrument builder wizard that comes with LabVIEW, it sets everything up so the files expect to be in instr.lib. It's been a little while since I have downloaded instrument drivers, so I forget how you fix it, maybe by just opening the .lvproj in your downloads folder, it realizes it's not going to be instr.lib.
I think the instr.lib folder had good intentions, but I really don't like the effects of it sometimes. The biggest issue is that if you move your project to a new computer, you have to make sure you update instr.lib as well. I find it easier to just keep the drivers in the same folder as the rest of the project, which unfortunately means having duplicate driver files if you work with the instrument in multiple projects. The nice thing about keeping them in the project folder, rather than instr.lib, is that you can modify them. Some drivers come with a lot of errors, and it is nice to be able to modify them without screwing up another project that relies on instr.lib.
Example: I was working with Ocean Optics spectrometers from instr.lib when I realized the data was improperly shifted. Other projects also used those drivers from instr.lib, most likely with a different model of spectrometer since no one reported this issue before, so I didn't want to modify them. My quick fix was to take the output and pad the amplitude array with zeroes, so that it lined up with the wavelength array. But if I had a separate copy of the drivers, which I did in a later project, I could modify the actual drivers to take the right number of data points.
07-28-2016 11:28 AM
I would be inclined to copy them to the project folder. I do sometimes tweak them for the specific project and wouldnt want to screw up the other projects that depend on them. I did some folder resructuring on my pc and that caused havoc with labview. At least I know how sensitive it is and not to do it in the future.
07-28-2016 11:30 AM
Yes, I think the best way is to press ctrl+e in the project to get the file view. In this way you can move files on disk and LabVIEW still knows where they are.
07-28-2016 11:48 AM
Thanks, I will keep this in mind.