Overview
LabVIEW 2012 introduces templates and sample projects, which provide recommended starting points designed to ensure the quality and scalability of a system. All of the templates and sample projects are open-source and include extensive documentation designed to clearly indicate how the code works and the best practices for adding or modifying functionality. In addition to demonstrating recommended architectures, these projects also illustrate best practices for documenting and organizing code.
You can create a new LabVIEW project from an existing template or sample project by selecting 'Create Project' from the Getting Started window. The list of available options depends on the software modules and drivers that you have installed. This document lists the templates and sample projects that are provided and supported by National Instruments.
Table of Contents
- Templates
- Desktop Sample Projects
- LabVIEW Real-Time and LabVIEW FPGA Sample Projects
- Adding Custom Templates and Sample Projects
- Getting Started with a Template or Sample Project
Templates
Templates demonstrate the fundamental building blocks of most LabVIEW applications. One or more templates are often used in combination to build real-world systems. These templates provide common architectures using well-adopted design patterns that you can modify to build a system.
Desktop Sample Projects
Desktop sample projects illustrate the use of one or more templates in an actual application. These projects fulfill the most common requirements of desktop-based measurement applications, including responsive user interfaces, asynchronous analysis, data-logging, user dialogs, error handling, and multiple independent tasks.
LabVIEW Real-Time and LabVIEW FPGA Sample Projects
Embedded systems typically require an architecture that is designed for reliability and deterministic performance. As a result, many embedded applications require processes dedicated to system status monitoring, error handling and watchdog timers. The LabVIEW sample projects for CompactRIO and PXI RT DAQ illustrate best practices for addressing these needs by providing recommended software architectures that can be used for a variety of embedded control and monitoring systems. These sample projects also illustrate best practices for data communication, network connectivity, control routines, data logging, and more.
CompactRIO Sample Projects
|
LabVIEW FPGA Control on CompactRIO This sample project is designed for applications that require high performance control and/or hardware-based safety logic. Rather than running the control algorithm in software, the control is implemented in the FPGA fabric, enabling your control loops to achieve rates faster than 10 kHz with minimal jitter. The FPGA VI also contains safety logic that immediately puts any outputs into a safe state upon a critical error or real-time software failure for maximum reliability. Read Documentation | Read Detailed Guide on NI Community | View Webcast |
|
|
LabVIEW Real-Time Control on CompactRIO (RIO Scan Interface) This sample project is designed for control applications that require deterministic performance with single-point I/O rates of 100 Hz or less. This sample project does not use the FPGA hardware, but leverages the deterministic, real-time processor for control. It uses the RIO Scan Interface (RSI) to access I/O data as variables within the real-time application. |
|
|
LabVIEW FPGA Waveform Acquisition and Logging on CompactRIO This sample project includes customizable high-speed FPGA based analog acquisition and logs the acquired data to disk on the real-time system when a trigger condition is met. This sample project is designed to run headless, or it can connect to the optional user interface that is provided. |
Real-Time Sample Projects (with DAQmx)
The LabVIEW Real-Time (NI-DAQmx) sample projects are designed for applications involving real-time control and/or waveform acquisition and logging.
Adding Custom Templates and Sample Projects
Advanced users can complement the included list of templates and sample projects with their own, making the new ‘create project’ an excellent mechanism to share and distribute recommended templates across a team of developers.
The Create Project dialog for a custom template or sample project can be changed to include additional items that can script the creation of custom code. For more information on how to create and add your own items to this dialog, click here.
Getting Started with a Template or Sample Project
Templates and sample projects require the use of a wide variety of LabVIEW skills and programming concepts. The documentation provided in each project enumerates the concepts that users need to be familiar with. In addition, the documentation on the block diagram clearly indicates where to add or modify code in blue colored comments.
You can also reference the LabVIEW Skills Guide to see a list of recommended skills and training resources.
Reader Comments | Submit a comment »
Thank you for the comments. There are
exceptions to the VI Analyzer guidelines
for error handling, and based on the fact
that the VI is called in the error catching
case, we made the decision that this was
acceptable. The use of strings was
chosen over enumerated constants - this
is largely a matter of personal preference,
though many maintain that strings are
easier to extend.
-
Simon Hogg,National Instruments.
simon.hogg@ni.com
- Dec 06, 2012
Queued Message Handler
Hi NI
Nice work on the Queued State Handler
project.
Can I suggest the following:
1. Address the VI Analyzer failed tests
(mainly Error Style)
2. Change the Message Type from a String to
an Enumerated type.
- Sep 24, 2012
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
