Selecting Your LabVIEW Real-Time Deployment Platform
Overview
National Instruments real-time products combine the NI LabVIEW graphical development environment with the deterministic performance of dedicated hardware to deliver applications with predictable timing, increased reliability, and stand-alone operation. This document offers information and advice to help you select the correct real-time target for your application needs.
Table of Contents
Real-Time Basics
Real-time operating systems evolved to facilitate two main types of applications: event response, and closed loop control systems. Event response applications require a response to a stimulus in a determined amount of time. An example of such a system is an automotive airbag system. Closed loop control systems continuously process feedback in order to adjust an output; an automotive cruise control system is an example of a closed-loop control system. Both of these types of systems require the completion of an operation within a specific deadline. This type of reliable timing performance is referred to as determinism.
Operating systems such as Microsoft Windows and Mac OS provide an excellent platform for developing and running your non-critical measurement and control applications. However, because these operating systems are designed for general purpose use, they are not the ideal platform for running applications that require deterministic performance or extended uptime.
General-purpose operating systems are optimized to run a variety of applications simultaneously, ensuring that all applications receive some processing time. These operating systems must also respond to interrupts from peripherals such as the mouse and keyboard. The user has limited control over how these tasks are handled by the processor. As a result, high-priority tasks can be preempted by lower priority tasks, making it impossible to guarantee a response time for your critical applications.
In contrast, real-time operating systems allow you to prioritize tasks so that the most critical task can always take control of the processor when needed. This property enables you to program an application with predictable timing characteristics.
For more information on the real-time concepts, view the Real-Time Tutorial.
LabVIEW Real-Time Application Development
LabVIEW is a graphical development environment designed for engineers who need to design flexible, scalable measurement and control systems. LabVIEW is a fully functional graphical programming language with the flexibility of a traditional text-based language. The intuitive graphical development environment combines the ease of use of configuration-based tools with the flexibility of a powerful programming language. The LabVIEW compiler generates optimized code with execution speeds comparable to that of compiled C programs.
The LabVIEW platform provides tight integration between software and hardware, eliminating the need for different programming languages to communicate with different hardware components. The LabVIEW Project streamlines the development of large-scale applications by making it easy to create new VIs, add existing VIs and files to the project, view source dependencies, and create build specifications for your application. The LabVIEW Project Explorer is a visual representation of the entire system, including source code and hardware execution targets such as real-time controllers, FPGAs, and PDAs.

Figure 1 - LabVIEW Project Explorer
The LabVIEW Real-Time Module extends LabVIEW graphical programming to create reliable deterministic applications. With LabVIEW Real-Time, you define program operation using one tool that spans each phase of the development process, including system configuration, algorithm prototyping, and application deployment. With LabVIEW Real-Time, you can develop on a Windows system and then download applications to run on dedicated real-time hardware targets based on off-the-shelf computing components and a real-time operating system. While the development experience is similar to that of desktop systems, the LabVIEW Real-Time Module adds tools to the environment to take full advantage of the real-time deployment platform.

Figure 2 - Rapid Development with Real-Time Code Generation
The LabVIEW Real-Time Module includes the Real-Time Project Wizard, which you can use to quickly create a basic real-time project. You can choose from several common real-time architectures, specify communication and data logging options, and define a real-time target on which to deploy the application. In a matter of minutes, you can have a host application, a target application, and shared variables used to communicate between the two. The Real-Time Project Wizard helps new users get up and running quickly, and can also serve as a valuable stepping stone for complex projects based on recommended real-time programming techniques.

Figure 3 - LabVIEW Real-Time Project Wizard
Real-Time Project Wizard Demonstration
Assigning Thread Priority to LabVIEW Code
The dataflow programming model of LabVIEW frees you from the sequential architecture of text-based programming languages. Because the execution order is determined by the flow of data between nodes and not by sequential lines of text, you can easily create applications that execute multiple operations in parallel. Additionally, LabVIEW makes it easy to assign thread priorities with the Configure Timed Loop dialog box.
In LabVIEW, you can assign priorities either to individual VIs or to individual Timed Loops. However, it is generally best to define priorities using one method or the other. Use the VI Properties: Execution dialog box to configure VI priorities. Use the Configure Timed Loop dialog box to configure Timed Loop priorities, as shown below.

[+] Enlarge Image
Figure 4 - LabVIEW Timed Loop Configuration
Debugging and Verifying the Timing of LabVIEW Real-Time Applications
LabVIEW Real-Time features built-in tools for debugging and optimizing real-time applications. Using standard graphical debugging tools such as execution highlighting, probes, and breakpoints you can view variable values and single-step through the execution of your application.
For advanced debugging, you can use the Real-Time Execution Trace Toolkit to verify the performance of your real-time applications without halting or pausing execution of the code. With minimal modifications to your real-time code, you can log application performance to a file and send it to the host computer for viewing and analysis. The trace tool viewer graphically displays multithreaded code execution while highlighting thread swaps, mutexes, and memory allocations. You can use the Trace Toolkit to optimize application performance by identifying undesirable execution characteristics and difficult-to-find race conditions.

Figure 5 - Advanced Debugging with LabVIEW Execution Trace Toolkit
In addition, you can use the LabVIEW VI Analyzer Toolkit to quickly identify style, performance, and documentation gaps of LabVIEW Real-Time applications. The toolkit interactively provides direct links to the sections of code identified and creates a report for automatic documentation of recommended changes. When followed, the guidelines provided by the VI Analyzer Toolkit result in flexible, robust, and performance-optimized software applications.
LabVIEW Real-Time Deployment Platforms Overview
All LabVIEW Real-Time deployment platforms are based on a common hardware and software architecture. Each hardware target uses off-the-shelf computing components such as a microprocessor, RAM, nonvolatile storage, and an I/O bus interface. The embedded software included on a real-time target consists of a real-time operating system, driver software, and a specialized version of the LabVIEW run-time engine.
Figure 6 - Real-Time Hardware Architecture
While all LabVIEW Real-Time targets share a single core architecture, each real-time platform has distinct characteristics geared toward a particular subset of use cases. PXI and PCI systems deliver higher performance while Compact FieldPoint and Compact Vision Systems deliver a high degree of ruggedness and reliability. The CompactRIO system provides a combination of performance and reliability. All platforms have the option to function as autonomous systems.
PXI Real-Time Systems
Real-time PXI systems consist of a rugged chassis, embedded controller, and plug-in I/O modules. The real-time PXI platform is often used for high-performance systems such as hardware-in-the-loop test of electronic control units and vibration analysis for machine-condition monitoring applications.

Figure 7 - An example PXI Real-Time System
NI RT Series PXI controllers run the ETS real-time operating system and application software on a dedicated high-performance microprocessor. The embedded software has access to all I/O in the PXI system, taking advantage of the PXI advanced timing and synchronization features to achieve precise I/O triggering and multi-module synchronization.
PXI Application Example
Lockheed Martin and G Systems used LabVIEW Real-Time and PXI to implement a wind tunnel test system for the F-35 Joint Strike Fighter. The new test system, developed in less than four months, replaced VME-based equipment to acquire, analyze, and store dynamic pressure data from a next-generation jet fighter engine design. The final system uses NI PXI-4472 dynamic signal acquisition modules to capture 128 channels of simultaneously sampled dynamic pressure measurements. LabVIEW Real-Time was chosen because it ensures maximum reliability for the test system to preclude any unnecessary test runs.
By using LabVIEW Real-Time and PXI, Lockheed Martin engineers now configure their test system 10 times faster than their previous VME equipment while doubling their channel count. In addition, the test cycle time was reduced from 2 s to 50 ms.
For more information about this application, refer to the NI customer solution, Lockheed Martin Reduces Costs and Time Testing F-35 Joint Strike Fighter with LabVIEW Real-Time.
CompactRIO Real-Time Systems
CompactRIO systems consist of a small, rugged, reconfigurable chassis, a real-time controller running the VxWorks real-time operating system, an FPGA chip, and hot-swappable industrial I/O modules. The I/O modules contain built-in and configurable signal conditioning, isolation, and an I/O connector to provide direct connections to your sensors and actuators. Data passes from the reconfigurable FPGA chip within the embedded chassis backplane to the real-time controller via an internal PCI bus. The CompactRIO real-time controller, with a powerful floating-point processor, executes embedded LabVIEW Real-Time applications for closed-loop control, acquisition, signal processing, data logging, and communication.

Figure 8 - An example of a CompactRIO Real-Time System
CompactRIO Application Example
Drivven, Inc. used LabVIEW Real-Time and CompactRIO to build a full-authority, FPGA-based engine control system for a high-performance motorcycle engine. Engine control requires deterministic loop times on the order of milliseconds and precise fuel and spark timing on the order of microseconds. Using three custom-created modules and CompactRIO, Drivven carefully tapped into critical motorcycle sensors and actuators. These sensors provided signals and events such as intake air pressure and temperature, coolant temperature, and throttle position.
While riding the bike at many different combinations of throttle position and engine speed, Drivven recorded the data to 1 Mb files. Periodically, an engineer in a chase vehicle would wirelessly FTP the data files from the CompactRIO to a laptop and analyze them immediately for coverage of operating points. A laptop-based LabVIEW application quickly sorted the data into speed/load operating tables while filtering out transient data. Drivven then used CompactRIO to prototype a research-oriented engine control unit, achieving performance comparable to the factory engine control unit, yet providing the flexibility to carry out future control algorithm research and development not possible with production-oriented electronics.
Using LabVIEW Real-Time and CompactRIO, Drivven spent about 12 percent of the time and about three percent of the typical cost of prototyping an engine control system from custom-designed hardware. Compact RIO and LabVIEW Real-Time delivered the reliability and precise timing resources required, and the system was rugged enough to withstand the high temperature and vibration of the operating environment.
For more information about this application, refer to the NI customer solution Drivven Prototypes FPGA-Based Engine Control System Using NI CompactRIO.
Compact FieldPoint Real-Time Systems
Compact FieldPoint systems consist of a controller with an embedded processor running the ETS real-time operating system and a variety of I/O modules. The Compact FieldPoint platform features rugged hardware, designed to operate in industrial environments. In addition, the software structure of Compact FieldPoint systems implements a built-in publish/subscribe protocol, which makes the Compact FieldPoint platform ideal for creating distributed applications.

Figure 9 - An example of a Compact FieldPoint Real-Time System
Compact FieldPoint Application Example
Shell Global Solutions used LabVIEW Real-Time and FieldPoint distributed I/O to develop a Slug Suppression System for an oil pipeline. The real-time control system decreases production waste by suppressing severe slugging and controlling transient slugs with no gas surges. The control system consists of a miniseparator positioned between the riser top and the normal first-stage separator. The Compact FieldPoint system uses LabVIEW Real-Time to control the miniseparator gas flow and liquid flow valves.
All control algorithms were implemented in LabVIEW using the PID Control Toolkit. In contrast to PLC and DCS tools, LabVIEW provided the correct set of tools and abstractions to quickly implement the complex control algorithms required by this system. In addition, the FieldPoint system includes a serial interface to communicate with existing systems and remotely control set points and modes of operation. With this redundancy built in, the availability of the system is 99.95 percent, assuming a 4-hour repair period for any downtime.
For more information about this application, refer to the NI customer solution, Shell Stabilizes Long Pipeline-Riser Gas/Liquid Flow.
Compact Vision System
Compact vision systems are small, rugged systems optimized for machine vision application such as automated inspection. A single, small compact vision system includes an embedded processor with a real-time operating system, connections for three IEEE 1394 DCAM cameras, a local video display, an Ethernet port, 15 digital inputs, and 14 digital outputs.

Figure 10- An example of a Compact Vision System
Other Real-Time Systems
Many test and measurement applications today are based on PCI systems, which allow the use of NI PCI-based hardware along with LabVIEW Real-Time. You can convert an industrial PC, single-board computer, PC-104 processor board, or even a standard desktop PC to a real-time target, as long as the hardware meets the system requirements of the ETS real-time operating system.

Figure 11- Examples of other real-time targets such as an Industrial PC, a Desktop PC, a Single-Board Computer (SBC), and a PC-104 Processor Board
LabVIEW Real-Time Deployment Platform Comparison
Each LabVIEW Real-Time deployment platform is designed for a slightly different application. PCI and PXI systems provide the highest performance while Compact FieldPoint and Compact Vision System deliver the most rugged hardware. The CompactRIO platform provides a combination of performance and rugged hardware. In this section, we compare each LabVIEW Real-Time hardware platform on the basis of I/O availability, performance, and physical attributes.
I/O Availability
The I/0 availability of a platform is a measure of the variety of I/O options available for the platform. I/O availability takes into account the availability of standard driver application program interfaces (APIs), as well as the the overall I/O customizability and expandability of the platform. NI platforms include a wide variety of I/O modules, including off-the-shelf, custom-built, and third-party modules. The off-the-shelf modules use standard driver APIs. Some NI platforms offer customizability by interfacing with custom-built modules, while others support customizable third-party I/O modules. Many NI platforms are expandable to include multiple chassis, computers, or backplanes.
| I/O Availability | |||||
![]() |
![]() |
|
|
![]() |
|
| Variety |
|
|
|
|
|
| Standard Driver APIs |
|
|
|
|
|
| Customizability |
|
|
|
|
|
| Expandability |
|
|
|
|
|
Figure 12 - Input/Output Device Comparison for LabVIEW Real-Time Systems
PXI and PCI I/O available for Real-Time systems include the following:
-
Data Acquisition (Analog and Digital)
-
Dynamic Signal Acquisition
-
Image Acquisition
-
Motion Control
-
FPGA-based Reconfigurable I/O (RIO)
-
CAN
-
Serial
-
GPIB
-
Ethernet
-
Chassis Expansion via MXI
-
IEEE 1394 Hard Drivers and Cameras
-
External USB Hard Drives
-
Third-Party Hardware


Figure 13 - PXI and PCI I/O Modules
NI PXI and PCI modules have standard driver APIs, while third-party modules offer customizable I/O. In addition, software-transparent I/O expandability is available with NI MXI. Using MXI, you can daisy-chain two or more systems together so that all I/O is controlled by a single PXI or Desktop PC controller.
CompactRIO Real-Time systems can take advantage of any of the following I/O modules:
-
Analog Input
-
Analog Output (voltage and current)
-
CAN
-
Motion
-
Digital Input and Output
-
Relay Output
-
Counter, Pulse Generation
-
Custom Modules

Figure 14 - CompactRIO I/O Modules
For more information on I/O available for CompactRIO, view the CompactRIO Product Selection Guide.
Compact FieldPoint Real-Time systems can take advantage of any of the following I/O modules:
-
Analog Input
-
Analog Output
-
Digital Input and Output
-
Relay Output
-
Counter, Pulse Generation
-
Custom Modules

Figure 15 - Compact FieldPoint I/O Modules
With Compact FieldPoint, I/O timing is defined by the I/O hardware; therefore, the API is less involved in comparison with the other platforms. You can daisy-chain two or more Compact FieldPoint systems together so that all I/O is controlled by a single Compact FieldPoint controller. For more information on I/O available for Compact FieldPoint, walk through the Compact FieldPoint Advisor.
Compact Vision System have built-in digital I/O capabilities and support up to three firewire cameras. To learn more about compact vision systems, see Compact Vision Systems NI CVS-145x Rugged Systems Run LabVIEW Real-Time.
Performance
The performance of LabVIEW Real-Time systems can be measured in terms of deterministic execution, I/O timing, triggering, synchronization, and processor speed. Determinism is the most fundamental component of all real-time systems. It is defined by how consistently a system is able to perform a given operation within a fixed amount of time. Determinism is affected by the OS, software program architecture, and integration of application software with I/O timing and synchronization capabilities. The processor speed determines the minimum loop-cycle time.
| Performance | |||||
![]() |
![]() |
|
|
![]() |
|
| Deterministic Execution |
|
|
|
|
|
| Timing, Triggering, and Synchronization |
|
|
|
|
|
| Processor Speed |
|
|
|
|
|
Figure 16 - Performance Comparison for LabVIEW Real-Time Systems
For detailed performance benchmarks, refer to the following documents:
Physical Attributes
In addition to deterministic performance, real-time operating systems impart a higher level of reliability because they are specialized, streamlined operating systems that use fewer resources and eliminate the fragilities of standard operating systems. In addition to a highly reliable software framework, LabVIEW Real-Time platforms include hardware modifications that deliver a high level of physical reliability suitable for industrial environments.
| Physical Attributes | |||||
![]() |
![]() |
|
|
![]() |
|
| Ruggedness |
|
|
|
|
|
| Portability |
|
|
|
|
|
Figure 17 - Physical Attribute Comparison for LabVIEW Real-Time Systems
National Instruments offers a variety of rugged real-time hardware platforms that extend the application space for LabVIEW Real-Time into harsh environments where the hardware must withstand extreme temperatures, shock, vibration, and intermittent power failures. The CompactRIO, Compact FieldPoint, and Compact Vision System platforms are designed with no moving parts, eliminating the most common failures due to shock and vibration.
Try LabVIEW Real-Time Today
In summary, you can use LabVIEW Real-Time to develop a variety of applications including high-reliability test systems, deterministic closed-loop control applications, and autonomous-operation systems. With a variety of hardware deployment platforms to choose from, you can select the hardware that matches the I/O, performance, and size requirements of your application.
For a demonstration of LabVIEW Real-Time, to request a visit from your local field engineer, or to attend a FREE Developing Real-Time Systems with LabVIEW seminar contact National Instruments at (800) 433-3488 or visit ni.com/realtime.
To test-drive LabVIEW Real-Time today, visit the LabVIEW Real-Time On-line Evaluation.
Downloads
Reader Comments | Submit a comment »
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/).






