Architecting Distributed Systems with NI Software
Connecting multiple components to create a distributed system can be a daunting task. With the proper tools, however, you can architect a distributed system to meet measurement, timing, space, and geographic constraints and benefit from increased computing power. With a distributed system, you can divide a system among many components and, if desired, keep some or all of the instrumentation remote.
Why Use a Distributed System?
You may use a distributed system for many reasons. Some of your applications, such as
those with test or control equipment residing in multiple locations or systems with limited room for equipment such as in-vehicle test, physically require a distributed system. Another reason for building a distributed system is to distribute the computing among several nodes to increase processing power and I/O bandwidth.
To take advantage of these benefits, architect your system using an integrated software framework, which includes application development environments (ADEs) and the measurement and control services that interface with the hardware and provide troubleshooting utilities. This software framework should offer tools for rapid development, flexibility to work with a breadth of bus technologies, tools for developing distributed applications, and system integration. In addition, this software framework makes transition and maintenance upgrades of distributed system nodes easier and transparent.

[+] Enlarge Image
Software Is Key
Figure 1 demonstrates the integration LabVIEW and NI Measurement & Automation Explorer (MAX) deliver for an example distributed system comprised of PXI, FieldPoint, and VXI components. This system meets many needs and integrates the hardware components into one application. The FieldPoint portion provides a reliable, rugged system for industrial control and data logging. In this system, you might connect to an existing VXI segment located remotely for testing a specialized application. You use the PXI segment -- which incorporates the latest technology to provide high-performance, low-cost instruments -- to make high-speed measurements and control the whole system.
This system might appear difficult to integrate, manage, and control; however, with the right software framework tools, you can simplify all the development process steps from configuration to test deployment. With MAX, you can configure all hardware connected to the system, run hardware diagnostics, define channel names, and specify scaling. Building on MAX configurations, LabVIEW simplifies your configuration programming. In addition, LabVIEW provides tools for rapid test development, user interface design, processing and analysis, and remote connection to instruments.
Design Considerations for Distributed Systems
When designing a system and choosing your instruments, you should consider many factors. Because the software framework simplifies multiple bus integration, you do not need to constrain the system to just one instrumentation bus. Instead, use the instruments that meet your needs not only for measurement functionality but also for locality and distribution.
Locality refers to the requirements to place certain measurement components physically close to other components. Considerations such as control-loop rates, synchronization, and throughput determine locality. One of the major factors of a control system is the rate at which it is able to complete a cycle of acquiring an input, processing it, and, in response, outputting a signal. Although the computer processor and the number of instructions limit maximum loop frequency, you can achieve faster control-loop rates through hardware timing and triggering. In addition, many applications require hardware synchronization to ensure that measurement signals are properly correlated. Due to clock drift and start latency, software synchronization does not provide timing accurate enough for many applications. Through hardware synchronization, however, you can ensure that your signals are synchronized down to the subnanosecond level. Critical features of hardware synchronization include a reference clock to ensure all peripherals are synchronized and trigger lines for parallel event handling. Triggers are critical for handling synchronous events such as starting a signal generator and digitizer as well as asynchronous events such as handshaking and sequencing. When comparing various bus triggering capabilities, consider factors like propagation delay and skew. For example, the emerging IEEE 1588 standard can synchronize timestamps to the submicrosecond level over Ethernet. For more accurate synchronization, PXI specifies intermodule skew of less than 1 ns for the PXI star trigger. Another locality consideration is bus throughput. Higher bus throughput rates are important for applications that send large data sets or require data streaming. High-speed or high-channel systems often require 10 to 100 MB/s or more. While it is important that the instrument performs at the desired speed and accuracy, it is vital that the bus provides the necessary loop rates, synchronization, and throughput.
In addition to locality, you also should consider distribution needs, such as physical requirements, remote locations, and connectivity, when designing distributed systems. You may need to determine if the instrumentation packaging supports size and ruggedness constraints. For example, with in-vehicle test, the environment has limited room and is rugged, so you might select remote control of a small PXI or CompactRIO system. For remote instrumentation systems, you need to consider the programming connectivity options available and their reliability and ease of use. NI provides a variety of remote connectivity protocols including HTTP and TCP/IP application programming interfaces (APIs), Logos, Virtual Instrument Software Architecture (VISA), and remote panel connection. When creating remote systems to control tests, review results, or log data from a remote machine, you should evaluate the protocols to find the one best suited for your application needs.
Integrated Software Framework
With an integrated software framework, you can take instruments that meet your functional, locality, and distribution requirements and combine their processing routines into one ADE. Instead of predefined function calls, this framework should use flexible APIs and PC processing power to process hardware-generated data into useful measurement information so you can maximize performance and development flexibility.
The first layer of the software framework, the measurement and control services, should provide support for a variety of bus technologies through a configuration manager, hardware drivers, and flexible high-level APIs. In Figure 1, you can see how to use MAX to view and configure all of the devices (PXI, FieldPoint, and VXI) and create and edit channels, tasks, and interfaces for the sample distributed system. In addition, you can run system diagnostics to differentiate between hardware and software debugging issues. Oftentimes, developers assume that the existence of a device driver alone is sufficient for integrating a measurement device; however, the driver also should offer fast performance, programming flexibility, a consistent and scalable API, and seamless ADE integration so that the software controlling the devices appears as an integrated part of the ADE.
The second layer of the software framework, the ADEs, should not only integrate with the measurement and control services layer, but also provide ease of use, scalability, application-level programming flexibility, and tools for developing distributed applications. Through standardization on a common, scalable ADE such as LabVIEW, LabWindows/CVI, or Measurement Studio, an organization saves administrative costs, builds internal expertise, and drives productivity by streamlining development. LabVIEW provides an easy-to-use graphical development environment with tools for acquisition, analysis, and presentation. Through interactive assistants, code generation, seamless integration with MAX, and the ability to interface with any measurement hardware, LabVIEW provides rapid development for this sample distributed application. In addition, LabVIEW features built-in functions for analyzing and processing signals and tools for user interface design, report generation, and data management. LabVIEW also provides a range of tools for developing a distributed application from low-level TCP/IP programming APIs to high-level tools such as remote panel connection. For example, using remote panel connection, you can operate the front panel of a VI that resides and executes on a node from your host machine.
By centering your distributed system on an integrated software framework with modern measurement and control services and LabVIEW, you enhance system flexibility and integration. By using the software framework rather than constraining yourself to one instrumentation bus, you expand the variety of instruments available for designing your system. Using flexible APIs and PC processing power, you can abstract the hardware to virtually define your own instrument. Lastly, the software framework provides rapid test development, tools for developing distributed applications, and system integration.
Faya Peng
VXI Product Marketing Engineer
faya.peng@ni.com
Obtain more information on virtual instrumentation and these software and hardware tools.
This article first ran in the Q2 2005 issue of Instrumentation Newsletter.
Reader Comments | Submit a comment »
Legal
This material is protected under the copyright laws of the U.S. and other countries and any uses not in conformity with the copyright laws are prohibited, including but not limited to reproduction, DOWNLOADING, duplication, adaptation and transmission or broadcast by any media, devices or processes.
