views:

558

answers:

2

I'm trying to build a LabVIEW plug and play instrument driver project for a device we sell. I followed the instructions to create a project, and it created the project in with the LabVIEW program:

C:\Program Files\National Instruments\LabVIEW 8.0\instr.lib

I suppose I could connect that folder to source control and just do all the work there, but it feels weird to be working under Program Files. When I tried to move the project folder out into my regular workspace folder, it broke all the subpalette files (*.mnu). I could recreate them, but I'm afraid they wouldn't work for our customers when they install the driver from the LabVIEW web site.

Is it possible to move a driver project around, or does it have to stay in the default location? If one of our customers has installed LabVIEW in a different location (say on drive D:) will the driver menus not work for them?

+1  A: 

Instrument drivers are always located in the 'instr.lib' folder in the current LabVIEW version folder. There is an environmental path set up in LabVIEW for this intrument driver folder so it will always point to the correct drive for the installation of LabVIEW used.

You should keep the folder in the location used by the wizard to ensure that when distributed to your customers the sub palette menus point to the correct location and all the VIs link correctly.

I use source control for user.lib which is in a similar location and have no problems.

Swinders
+1  A: 

I'm not in favour of user.lib for SCC'd items. using several LabVIEW versions at a time is a big problem. Here is my routine:

  1. Create the instrument library and save all code in a folder starting with an underscore ('_') (_foo)
  2. Create an .mnu file in the parent folder of '_foo' Mylib.mnu, add the icons you need.
  3. With OpenG package builder I create an installer routine that placed the the mnu file and the folder in instr.lib
  4. After a restart of LabVIEW the instrument driver shows up in the instruments palette.

If you keep the code in the same relative position to the mnu file there is no problem with missing VIs.

Ton

Ton
Thanks, I hadn't heard of OpenG package builder. If others are looking for it, it's at http://ogpm.sourceforge.net/
Don Kirkby
You'd better install it with VIPM (there is a free version just for installs) instead of getting the sourcecode.Ton
Ton