I spent the day writing a device driver for my new general I/O board for LabView using the Instrument Driver Project creator as outlined on the latest LabView tutorials. It works great on my computer, even integrated into the "Instrument I/O" panel of the toolbar. Really great.
But! This obviously has to be something that I can post on a website or email to people for them to install on *their* computers! I tried using the Build settings as described in another tutorial in order to produce a zip file, a source folder, and an installer. However, none of these export options seems to produce a labview library which can be opened without nasty error about the files not being found. Obviously, the files are present in the directory, but it's looking for them in the *original* folder instead of either the the install folder or a folder in a directory relative to the library file. It's really quite absurd, so I assume I'm doing something wrong... but I can't find any information about how to do this right. When I follow the instructions I can find, it doesn't work at all.
What I *expected* was that if I created an installer, when an end-user with LabView installed ran the installer it would integrate the new Instrument I/O vi's into their LabView panel. But this doesn't happen. Additionally, when you look in the installation directory (by default not the LabView directory, but a directory in Program Files/Driver Name) all the files are there. But if you open the library in the Volume directory, it complains about the vi's being in the wrong location, then loads them from the wrong location.
It seems obvious that the behavior of the installer should be to put the appropriate files into the location where LabView searches for instrument drivers. That it doesn't do this confuses the bajeezus out of me. Can anyone explain to me or give me a link to instructions how to accomplish this seemingly obviously necessary feat? I can eventually upload my driver to the NI network, but I want to at least test it first!
I have attached a zip file of the installer directory, which I did not include the runtime environment in for size reasons. I also attached a zip file of the original directory. It won't work unless placed in the correct location in the LabView folder. It probably has an old version of the build options I was using.
Solved! Go to Solution.
I realize that I can do it this way, but my issue is that I don't want an end-user to have to do it. I want an installer to automatically place it in the right location, or a library file to contain portable file location information. I don't have any .lib files anywhere.
Why would the installer even ask for the LabView installation directory if it's not going to put something there to tell LabView where to look for the device driver files...?
The installation folder is something that you have to specify when you create the installer and it is not correct to leave it as the default when you want to install an instrument driver. You must specify instr.lib. The installer default is fine for an application. The paths for the lvlib, mnu files, etc., in the project you created all point to instr.lib. The paths in the project can be changed but that is not something the installer can do. The end user should not even be allowed to select a different installation location.
I would also suggest you submit the driver to NI for certification and inclusion in the Instrument Driver Network. Users can then use the Find Instrument Driver wizard that is in LabVIEW for a painless and simple installation.
Thanks, that makes sense.
Is there a way to tell the installer to automatically detect the LabView installation directory and place it in the instr.lib subdirectory? How else is it handled if the user chose a non-standard installation location for LabView (or installed it on a drive not called Drive C)? Or if their LabView version doesn't include, for instance, 8.2 as mine does?
Is there some way to find the environmental path where the instr.lib or LabView directories are located? I tried searching for this term, but the returns said that there was one but gave no information on how to use it or what it was called and I'm fundamentally a linux guy. So, windows is a bit of a mystery to me in terms of that sort of functionality.
I think that I have gotten this figured out, perhaps others can use the solution.
On the "Source Files" category under build specifications for an installer, [LVDIR] represents the LabView installation directory. So, if you create the directory instr.lib under [LVDIR], you're now installing in the root instr.lib directory. Next, create yet another directory named identically to your source project directory (so that it can find the files) and mark that as the installation directory. On the Project View side, open up "My Computer", select your lvlib on the left and your installation directory on the right and click the right arrow between the two panes. This will create an installation directory structure in the correct location on the target.