LabVIEW Programming Architectures and Frameworks

 

LabVIEW 2012 has reworked the templates and frameworks that have been in LabVIEW for many years

In LabVIEW 2012, NI has simplified access to some of these traditional architectural constructs and has reworked the LabVIEW templates. NI is making it even easier to build applications … pretty nice.

LabVIEW 2012

Templates & Frameworks

LabVIEW 2012 has reworked the templates and frameworks that have been in LabVIEW for many years. For example, the State Machine template has been reworked to be more usable than prior versions. In addition, there are several fairly well developed applications that almost work right out of the box.

The State Machine (SM) and Queued Message Handler (QMH) templates are reworked versions of existing frameworks that either were available from within LabVIEW menus or by downloading examples from the web. The SM template now does a better job of providing reusable constructs that do not require so much rewriting to make it fit your application. The QMH is a twist on the SM architecture by pushing actions onto a multi-element queue, whereas an SM effectively only pushes 1 action at a time. With QMH, there can be multiple loops pushing messages onto the queue, making it more flexible that the single source provided by the SM.

Another template is new. This Actor Framework (AF) template uses LabVIEW objects, which are quickly becoming of interest to LabVIEW programmers. The idea with the AF is that you create a base class of common actions that can be applied many times in an application (with perhaps individual behaviors), such as menu item handling, or configuration file handling, or asynchronous measurements.

In addition, you can extend add your own templates by following some specific development steps. Take a look at http://www.ni.com/white-paper/14045/en.

Sample Projects

LabVIEW 2012 has also added some almost functional example projects. These examples are good for real-time (RT) and non-RT (or desktop) applications.

The desktop apps are Finite Measurement, Continuous Measurement and Logging, and Feedback Evaporative Cooling. Following the same categories as the templates, these examples use the SM, QMH, and Actors, respectively.

The RT samples use either the FPGA, cRIO, or both. In addition, there are some samples that use DAQmx for acquisition, rather than via the cRIO I/O that comes through the FPGA.

Summary

LabVIEW application developers are becoming increasingly savvy at good programming practices and techniques. NI has made it simpler to learn and deploy some of these ideas with better templates and samples built into LabVIEW 2012.