Developer Center Resources

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating and Managing Reusable Code in LabVIEW

NI Tools Network Developer Center » Creating and Managing Reusable Code in LabVIEW

 

In software development, creating code you can reuse has many benefits to a company and development team.  Reusable code helps you bring products to market faster since you don't need to redo work you have already done. This also helps in maintaining quality across all of your applications as the same code exists throughout, making maintenance and upkeep an easier task.  It can help different developers on the same team provide a consistent implementation and allows you to transfer code between developers much easier.  Finally it reduces the number of software defects since fixing a bug in one place fixes code in multiple places.  All of these benefits can directly lead to great cost savings for a company throughout multiple development projects. 

 

In the following documents we talk about some best practices for developing reusable code in LabVIEW. 

 

  • Scalable Architectures
    • Using a scalable architecture for an application can help you easily expand your application and reuse your own development efforts when you want to add new features.  Once you create a good scalable architecture for your company, you can create templates that you and others can reuse for future projects.
  • Strategy for designing an API
    • Creating an Application Programming Interface is a way to abstract code that is already written and is a great place to start when creating reusable code. 
  • Best Practices for creating Icons in LabVIEW
    • One important aspect of making your reusable code readable is to make sure the VIs have high quality icons.
  • Documentation Best practices
    • Another important aspect of reusable code is to make sure that other users know how to use it. Therefore, documentation is key.
  • VI Package Manager
    • When making use of reusable code, it’s very important that all developers stay on the same version or have the power to move between versions. You can also increase efficiency by making the reusable code libraries easily available for use whenever they are needed. A great tool for doing this is VI Package Manager, built in LabVIEW by JKI.
  • Source Code Control (from Software Configuration Management and LabVIEW)
    • Managing and maintaining your code is highly important. You want to be able to keep track of changes, particularly if development is shared across developers.  Source Code Control is a powerful and useful way to do this and is built into LabVIEW.

 

The material for these documents were inspired by the Creating and Maintaining Reusable Code presentation from NI Developer Education Days 2012.  This presentation can be found on the User Group Resource Center