Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Document Type: Tutorial
NI Supported: Yes
Publish Date: Sep 6, 2006


Feedback


Yes No

Related Categories

Related Links - Developer Zone

Related Links - Products and Services

LabVIEW 8 – Distributed Intelligence for Design, Control, and Test1

6 ratings | 4.17 out of 5
Print

Overview

What comes to mind when hearing the words distributed system? For mathematicians, it may be farming out computing tasks to a computer grid. Business executives may think of Web-based commerce systems globally processing orders. Facilities managers may imagine wireless sensor networks monitoring the health of a building. All of these examples, however, share a fundamental theme – a distributed system is any system that uses multiple processors to solve a problem. Because of the tremendous cost and performance improvements in semiconductor technology, engineers are finding more effective ways to meet application challenges by adding more computing engines. The products designed, as well as the systems developed for testing and controlling these products, are becoming more distributed.

However, designing multiple computing engines into a test or control system has not been as easy as engineers might hope. Developing distributed systems introduces an entirely new set of programming challenges that traditional tools do not properly address. This paper identifies the core attributes of a distributed system as applied to an engineering design, control, or test application and outlines the key challenges in developing these types of systems. Additionally, this paper introduces how the National Instruments LabVIEW 8 graphical development environment addresses these challenges with new distributed intelligence technology that includes:

• Programming multiple targets such as desktop, industrial, mobile, and embedded devices
• New LabVIEW project to provide an intuitive system view for navigating and managing distributed systems from a single environment
• New communication interface, the LabVIEW shared variable, to simplify data communication among distributed devices and systems
• Tools for timing and synchronizing within and between distributed devices and systems

Examples of Distributed Systems in Design, Control, and Test

Developing a distributed system requires unique programming approaches. For instance, in the sensor network example, wireless sensors are self-organizing units that organically connect to other sensors in the vicinity to build a communication fabric. Obviously, the advanced researchers working on this technology face completely new software challenges. These advanced concepts are not yet commonplace, but, as illustrated by the applications below, engineers and scientists are facing many of these same programming challenges that exist in the systems they are designing, controlling, and testing today.

Design
• Automobile electronic stability controls use microprocessors near the center of gravity to monitor inputs from braking and steering systems and make slight adjustments to keep the vehicle stable.
• Smart phones combine high-performance DSPs for audio processing with microprocessors for handling other tasks such as PDA capabilities.

Control
• Machines controlling manufacturing processes, such as extruders, printers, or packaging machines, combine multiple controllers working in concert to manage the flow of raw materials into the process and move the finished product out.
• Industrial monitoring systems feature remotely distributed, headless control units that monitor and control different plant conditions while logging data to enterprise databases.

Test
• Structural test and monitoring systems – whether measuring the structural response of an airplane wing or the safety of an automobile during crash tests – can feature hundreds of I/O points gathering data at various subsystems located around the structure. Correlating these distributed measurements through advanced timing and synchronization schemes can be critical to effectively analyzing the result.
• Hardware-in-the-loop (HIL) tests, which test dynamic control systems, simulate the external environment with high-speed, real-time I/O controlled from one system tightly coupled with the engine control unit (ECU) under development. These two processes working together form a combined test and control system.
What may sound like a simple task – adding a processor to improve performance, integrating a DSP for specialized signal processing, replacing a simple measurement device with an intelligent sensor – exposes engineers and scientists to a whole new world of distributed system development challenges. However, relief is on the way in the form of a new software development approach that facilitates distributed development and takes advantage of new processing power.

What Is a Distributed System (Reprise)?


Revisiting the original question, a fundamental definition of a distributed system is:
A system that uses multiple processors to create an application.

However, there are two extensions to this definition regarding the processors used in a distributed system:
Processors used in a distributed system can be of mixed architectures, including microprocessors, DSPs, or FPGAs.

Distributed systems can be physically located on a single board, box, or rack, or spatially distributed in separate devices or systems on a network.

This definition reveals the specific programming challenges engineers and scientists face when developing distributed systems.

Distributed Development Challenges


The applications highlighted above are from very different industries and product life-cycle phases but have one thing in common – they all are forms of distributed systems. The challenges engineers and scientists face in developing distributed systems include:
1. Programming applications that take advantage of multiple processors based on the same or mixed architectures
2. Sharing data efficiently among multiple processors that are either directly connected on a single PCB or box or remotely connected on a network
3. Coordinating all nodes as a single system, including the timing and synchronization between nodes
4. Integrating different types of I/O such as high-speed digital, analog, motion, and vision
5. Incorporating additional services to the data shared between nodes, such as logging, alarming, viewing with remote VIs, and integrating with enterprise systems

Figure 1. Distributed systems can range from systems physically located in a single box or rack to systems
remotely distributed in separate devices or systems on a network.

Using the new features of LabVIEW 8, engineers and scientists can address these challenges, explored in more detail below.

Programming Distributed, Heterogenous Computing Nodes


Distributed systems often include nodes such as sensors, devices, or systems that perform different functions. For example, a plant automation system may include three separate nodes – one for motion control, another for automated inspection, and the third for environmental control. The motion controller may be programmed with G, the vision system with C, and the PLC environmental controller with ladder logic. Additionally, all of these nodes might communicate to a host supervisory system that logs data. Currently, architects of such distributed systems expect programmers to use different tools to program each of these nodes. Furthermore, the motion control system may have advanced requirements that cannot be met by off-the-shelf hardware, thus requiring engineers to resort to configurable hardware such as FPGAs to execute complex mathematical algorithms. This situation complicates development by requiring expertise in multiple tools and languages, necessitating more time to ensure that the systems work together.

LabVIEW 8 addresses this programming challenge by providing the tools to program dissimilar nodes from a single development environment. Using LabVIEW, engineers can develop code to run on computing devices ranging from desktop PCs, embedded controllers, FPGAs, and DSPs. In addition, the LabVIEW platform includes the specialized functions required for each task such as image pattern matching for automated inspection, trajectory generation for motion control, and measurement and digital logic for environmental control. Moreover, LabVIEW also facilitates complex advanced signal processing algorithm programming and provides direct connectivity to the Web for local and remote operator interfaces. The ability of one tool to transcend the boundaries of node functionality dramatically reduces the complexity and increases the efficiency of distributed application development.

[+] Enlarge Image
Figure 2. With the wide array of LabVIEW computing targets, engineers and scientists can choose the right
run-time environment for their applications and scale as their needs change.

Once programmers obtain the tools to program their computing engines, they need to take advantage of the multiple processors available. For example, if a system includes several computing engines, parallel execution is important. However, this simple concept can be difficult to implement in text-based languages that traditionally execute sequentially. Conversely, LabVIEW was established 20 years ago as a parallel language. The graphical language constructs naturally represent the simple concept of parallel execution. With LabVIEW, engineers and scientists can easily develop parallel-executing applications simply by placing multiple loop structures into their code. Figure 3 is a graphical representation of two independent loops executing independently in parallel.

[+] Enlarge Image
Figure 3. LabVIEW graphical constructs naturally represent critical programming concepts such as parallelism.

This is a natural, intuitive representation of a very difficult coding challenge. Parallel execution can be critical in automated test systems, where multiple units under test (UUTs) may be tested; in control systems, where real-time tasks are closing control loops while simultaneously communicating data to a host interface; or in embedded applications, where multiple types of inputs must be addressed in a deterministic fashion.

Communication and Data Transfer


Distributed applications require various forms of communication and data sharing. For example, a widget sorting system illustrates the need for sharing data between nodes. A motion controller moves the widget into a position where the vision node can acquire an image and then determine where the widget should be moved. At the simplest communication level, the nodes can communicate via a physical digital interface to trigger the image acquisition and send feedback. However, raw analog and digital I/O lines often have distance limitations1, are not easily scaled, and cannot send complex data. Furthermore, this method does not share data with the rest of the system that may include a host user interface and a remote handheld client. For this reason, engineers are increasingly using communication layers such as Ethernet for larger distributed systems.

Addressing communication needs between often functionally different nodes is challenging. While various standards and protocols exist for communication – such as TCP/IP, Modbus TCP, OPC – one protocol cannot usually meet all of an engineer’s needs, and each protocol has a different API. This forces system integrators to use multiple communication protocols to complete the entire system. For deterministic data transfer between nodes, engineers are often forced to use expensive solutions based on technologies such as reflective memory. In addition, any communication protocol or system an engineer uses also must integrate with existing network communication protocols such as OPC. One way to address these often competing needs is to abstract the specific transport layer and protocol. By doing this, engineers can use multiple protocols under the hood, unify the code development, and dramatically save development time.

LabVIEW 8 distributed intelligence addresses these challenges with one flexible, open communication interface that provides data sharing among real-time controller nodes (for example, a vision system and motion control system) and integrates with OPC. LabVIEW 8 shared variables, an abstraction layer for protocol transport, can handle complex data types required for advanced distributed applications and can scale to include high-level functions such as logging and alarming. Engineers can use shared variables to share data to and from any node in the system including real-time nodes, historical databases, and Web-based supervisory consoles.

[+] Enlarge Image
Figure 4. The LabVIEW shared variable is an abstraction layer for protocol transport, complex data type handling,
and scaling to include logging and alarming.

Engineers can configure shared variables through interactive dialogs, making it easy to bind controls and indicators to data sources across any network.

1 The industry-standard connection denotation is 4 to 20 mA connections.

Navigate, Debug, and Deploy Code to Distributed Nodes


Moving data and commands among different computing nodes in a distributed system is only one of the challenges involved in developing a distributed system. Managing and deploying the source that runs on these distributed nodes is a fundamental challenge faced by system developers. In the simplest distributed case, where homogenous computing nodes execute the exact same source code, engineers can maintain the master source in one place and then distribute it to all nodes when they alter the code. In the advanced distributed case, each node has dissimilar executable code running on mixed architectures, and all nodes may not be online simultaneously.

LabVIEW 8 manages the source code and application distribution for an entire system of computing nodes from one environment. The new LabVIEW project in LabVIEW 8 stores the source code and settings for all nodes used in the distributed system, including PCs, real-time controllers, FPGA processors, and handheld devices. The project also hosts a number of tools that developer teams can use to manage a large application, including:
• Integrated source code control compatible with the leading SCC tools
• LabVIEW project libraries that package code as modular, reusable functions that developers can easily plug into systems as needed
• System hardware configuration that developers can use to configure acquisition and control I/O on any remote node in the system directly from the project
• Build specifications that developers can use to define and save multiple project builds for source code distribution, debugging, component building, or final deployment scenarios

Figure 5. The new LabVIEW project stores the source code and settings for all nodes in a distributed system,
including: PCs, real-time controllers, FPGA processors, and handheld devices.

With LabVIEW 8, developers can significantly simplify the entire system development. All real-time, FPGA, and handheld devices in the system are visible in the LabVIEW project, making it easy for developers to manage the system. Developers can add targets to the project even if they are off line, making it simpler to design the architecture and develop the system when some components are missing. From an intuitive tree view in the project, developers can view, edit, redeploy, execute, and debug code running on any node in the system. Developers can observe the interaction among all the distributed system nodes in real time, which is critical because intelligent nodes can execute simultaneously. This ability improves communication and synchronization design, development, and debugging, as well as reducing overall development time significantly.

Synchronizing the System across Multiple Processors and Targets


An important component of many distributed systems is coordination and synchronization across intelligent nodes of a network. For many test and control systems, the interface to the external system is through I/O – sensors, actuators, or direct electronic signals. Traditional instruments connected through GPIB, USB, or Ethernet to a computer can be considered a node on a distributed system because the instruments provide in-box processing and analysis using a processor. However, the system developer may not have direct access to the inner workings of a traditional instrument, making it difficult to optimize the performance of the instrument within the context of an entire system.

Through virtual instrumentation platforms – such as PXI or CompactRIO, which are based on chassis with backplanes and user-selectable modules – engineers have more options for synchronization and control. LabVIEW 8 provides fast development for FPGA-based reconfigurable I/O (RIO) devices and tight integration with dedicated circuitry for synchronizing multiple devices to act as one for distributed and high-channel-count applications. Engineers can extend PXI chassis backplanes across two or more chassis to share timing and trigger signals. PXI timing and synchronization modules (NI PXI-665x) use the trigger bus, star trigger, and system reference clock features of PXI to implement advanced multidevice synchronization. Additionally, engineers can synchronize multiple PCs, PXI systems, or NI CompactRIO systems using the LabVIEW FPGA Module and FPGAs on NI RIO devices. With LabVIEW graphical programming and the digital lines on the reconfigurable FPGA, engineers can easily synchronize multiple devices.

Figure 6. LabVIEW 8 offers dedicated deterministic communication for advanced distributed applications.

In addition to these hardware approaches for routing timing and synchronization signals, LabVIEW 8 also introduces a new deterministic Ethernet solution for synchronization among systems. The new, time-triggered shared variable addresses advanced distributed applications including distributed control and simulation systems, distributed simulations, and correlated data acquisition across networks. LabVIEW 8 provides an off-the-shelf solution to achieve network cycle rates from 100 μs to 100 ms and ±5 μs clock synchronization between nodes.

LabVIEW 8 Introduces Distributed Intelligence


Design, control, and test systems are being transformed into distributed systems that integrate more computing power. LabVIEW 8 delivers a powerful framework for engineers and scientists to easily design, manage, deploy, and synchronize distributed systems. To solve the distributed development challenges today and in the future, LabVIEW 8:
• Targets multiple architectures, including desktop, industrial, mobile, and embedded devices such as MPUs, DSPs, and FPGAs
• Introduces the LabVIEW project, an intuitive system view for navigating and managing distributed devices from a single environment
• Simplifies data communication between different computing engines with the new shared variable
• Provides numerous approaches for timing and synchronizing systems, including a new, deterministic Ethernet technology for network synchronization

From the simplest benchtop design lab to the advanced world of embedded design, the LabVIEW graphical development platform is driving productivity for scientists and engineers. Innovation feeds on the combination of the intuitive graphical programming language, compatibility with a wide variety of I/O, easy-to-develop distributed systems, and the growing community of users building on the LabVIEW platform.
6 ratings | 4.17 out of 5
Print

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/).