Labview Projects

Since the release of labview project explorer, it has become easier now to manage labview projects. Labview project file names ends with .lvproj as apposed to .vi which is the file extension for labview ‘subroutines’ and .exe for executables on windows OS. Through labview projects, one can easily create new vis, libraries, controls, classes even executables and installers. Such flexibility and ease make it a good choice to manage labview applications of all sizes. Still, one have to be careful to structure both projects in explorer as well as file structure on OS to ensure project is readable and unnecessary ‘Dependencies’ are not created.

labview projects are great to organize all contents and even create executables and installers within single project .lvproj file, Khurram Waris said.

A good labview project

There are many ways developers structure contents within labview project. One famous approach is to create directories in one of the hard drive partition for different type of contents and then ‘Auto-populate’ folders within project explorer. Auto-populating automatically syncs contents and display new files added into folders and surely makes organization simple. Even better approach is to create libraries within projects for individual ‘Modules’ related to application. Here is a screenshot of a project with libraries to manage contents.

labview project

“Complete contents of a module could easily be packed within .lvlib library which could also be duplicated”

To create .lvlib library simply right click target ( in this case ‘My Computer’) and select library in New menu. Save library in desired location and once library is created. Right click library and create any new contents required i.e vi, custom controls, classes and even virtual folders to further give an organised structure within library in project explorer. I prefer to create a Template and then use template to create other modules. In this way, I significantly reduce development time and also create code that would more likely run and work upon completion without significant bugs. Once template is fully tested, any duplicated code is guaranteed to work anyway!. Here is an example of a structure of a template ‘Module’ as well as module ‘Sensor’ created using template Module library.

Improve development productivity using .lvlib files

labview project

Notice structure of both Module library as well as Sensor library. Both have exactly same structure. Likewise, all other modules would have identical structure. In this manner, we can duplicate existing work to a great extent and safe time and be more productive. Also, individual modules are designed for specific functionalities which could be programmed within directories ‘Integration VI’ and ‘Public Vis’. Notice also the nomenclature that I used. Public vis and Public controls are those that might be required to be called by other modules. In comparison, Private vis are exclusive property of owning library and access is restricted by other libraries. Notice all Private contents have a ‘red key’ symbol representing private/locked contents.

In this article, I briefly went through few techniques that developers could inherit in daily programming practices to improve coding and productivity and design safe, neat and reliable code. There are other articles on websites with further tips but do not hesitate to ask should assistance is required.