LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How does Labview organize device drivers files on the dev computer?

I'm building a simple device driver for an OnTrak ADU218 USB relay interface.  I imported the .dll using the import wizard and have most of the functionality I want, but I'm confused about how Labview organizes everything on my development computer.  It seems to have put files all over the place and I can't tell which ones I can move/delete/rename and which I cannot.  Last night I had everything working well, but then made the mistake of trying to clean up my project--it shattered and I had to start from scratch.  (I've actually done this several times with various projects.)
 
My directory tree for this project looks like this:
 
--My Documents\ADU-218 Relay  (The directory where I want to do my dev work.)
ADU 218.lvproj
ADU 218.aliases
--My Documents\ADU-218 Relay\OnTrak Source  (Self-created subdirectory for OnTrak .dll info)
AduHid.dll
AduHid.h
AduHid.lib
--Program Files\.......\Labview 8.2\user.lib\ADU 218  (Labview created this directory and files)
ADU 218.lvlib
AduHid.dll
Report.html
--....\user.lib\ADU 218\ADU 218  (Labview created this directory and the vis from the functions I selected in the wizard)
Close Adu Device.vi
Open Adu Device.vi
Write Adu Device.vi
Read Adu Device.vi
Show Adu Device List.vi
I'm having a really hard time getting my head around the way Labview links all these files and organizes its directory structure.
 
I assume I'm supposed to edit this project via the .lvproj file located in My Documents, but I can edit the vis directly or through loading up the .lvlib.  Is this a no-no?  It looks like Labview copied the .dll from my OnTrak Source directory to the user.lib directory tree.  Does that mean none of the files in the OnTrak Source directory are needed anymore and could be deleted?
 
As I am creating vis, I want to be able to keep a toolkit of vis on a thumb drive that I can use for future projects.  What's the best to move/copy projects between computers?  My vis are independent from each other--if all I need is one vi can I drag and drop that single vi and the .dll to my target computer?
 
Some similar projects I've done have put files in the instr.lib directory.  I'm guessing Labview defaults to user.lib when using the Import DLL wizard and the instr.lib when using the Instrument Driver wizard.  Can I move my ADU 218 project to the instr.lib directory so it shows up in the correct place in the menu?
 
TIA,
 
Dave
 
 
0 Kudos
Message 1 of 2
(3,084 Views)
Hello Dave,
 
This is Dominic from Applications Engineering at National Instruments. Thank you for contacting us.
 
It is possible to edit your project via the .lvproj file within My Documents or through loading up the .lvlib. Both methods will lead to the same results and thus it is up to you to decide which you prefer is better.  You are right in assuming that the AduHid.dll file from the OnTrak Source directory is no longer required since LabVIEW copied it into the user.lib\ADU 218 directory.
 
If you would like to save all your files on a USB drive then the best way to do so is save them into a zip file. As long as you have the .lib file containing all necessary VIs you can work on any computer. The following knowledge base article discusses how to zip your files using Build Sepcification feature in Application Builder:
 
What is the Build Specification Feature in Application Builder
 
Here's a link to a tutorial on how to create zip files with Application Builder:
 
Distributing Applications with the LabVIEW Application Builder
 
In addition, you can also search LabVIEW help for more information regarding creating zip files by typing "zip" in the search box..
 
To answer your final question, yes you can add an instrument driver VI to the functions palette. There is a well written document on how to do this. Simply type type "Adding VIs and Controls to the User and Instrument Driver Subpalettes" within the search box to see this document.
 
 
 
 
Best Regards,

Dominic L.
0 Kudos
Message 2 of 2
(3,043 Views)