This article discusses how to create a distributed processing and I/O system with NI VeriStand, which includes many features that make developing distributed systems a more efficient and powerful experience.
Control systems, such as those found in airplanes, automobiles, or other industrial projects, often require more computational power and I/O to monitor, test, or simulate than a single processor card and chassis can provide. This white paper explains how you can create a scalable and distributed system to meet the needs of a large hardware-in-the-loop (HIL) or real-time test system. NI VeriStand is a ready-to-use software environment for configuring real-time testing applications, including HIL test systems. Using the features of NI VeriStand, you can create this system without the need to design, program, and maintain the software architecture.
You can often break down large systems into many different components and implement and treat each component’s hardware and software separately. To provide more computational power and I/O capacity, you can implement each component of the system on a different set of hardware.
For example, an airplane’s flaps, slats, rudder, engines, ailerons, and so on all need to be simulated and/or tested. You can separate this system into multiple pieces of hardware, as shown in Figure 1, to take advantage of a modular approach.
Figure 1: You can use multiple PXI systems to simulate components of an airplane.
Using NI VeriStand, one or more host (operator) computers can communicate with one or more real-time execution targets with minimal configuration. NI VeriStand handles all of the communication between host computers and execution targets. Figure 2 shows a simple topology involving one host and one target.
Figure 2: Simple Topology
The component of the host that communicates with the target is the NI VeriStand Gateway. This is handled automatically, but it is a key concept to understand larger topologies.
You can easily add targets to an NI VeriStand system definition with NI VeriStand's System Explorer. A single system definition file can contain an unbounded number of targets. Each target can have its own specific hardware and software configuration, and all targets can be deployed to and interacted with from a single gateway.
Figure 3: Multiple targets can be deployed to and interacted with from a single host.
Additional host computers can communicate with the same target topology by communicating with another host’s gateway.
Figure 4: Multiple Hosts and Multiple Targets Topology
To accomplish this, the additional hosts simply need to change the address of the NI VeriStand Gateway to be the remote host. The rest of the application remains the same.
To make a distributed system behave like a single system, sharing data between the component systems is often required. This is a key element that gives all of the different pieces the ability to work together. This is commonly accomplished using reflective memory interfaces.
Reflective memory networks are real-time local area networks (LANs) in which each computer always has an up-to-date local copy of the shared memory set. These specialty networks are specifically designed to provide highly deterministic data communications. They deliver the tightly timed performance necessary for a variety of distributed simulation and industrial control applications. Reflective memory networks have benefited from advances in general-purpose data networks, but they remain an entirely independent technology, driven by different requirements and catering to applications for which determinism, implementation simplicity, and a lack of software overhead are key factors.1
Reflective memory gives NI VeriStand the ability to share data between multiple targets while meeting the performance and determinism requirement of the entire system. Using reflective memory, you can split up a simulation model to execute on different target systems simultaneously. The input and output values are shared between the individual systems over reflective memory. GE Intelligent Platforms reflective memory boards are natively supported in NI VeriStand 2010 and later. Many components of NI VeriStand can automatically use reflective memory to help you seamlessly create a multitarget system.
For example, you can configure a stimulus (test) profile to run on Target A that references data on Target B. You can also map data from one target to another, like a model output to a model input on a different target. This is done automatically with no explicit configuration by the user.
Figure 5 shows an example system with reflective memory cards.
Figure 5: Multiple Chassis With Reflective Memory
It is important to think about timing and synchronization requirements when designing a system. If the system is not synchronized, the sampling of inputs and outputs does not happen simultaneously. Also, drift over time can cause one component of the system to collect more samples than another even if they are configured for the same rate. This can cause problems for simulation systems. For example, one simulation model could be in a different time state than the other. Finally, data analysis can be difficult or impossible without an accurate common time base.
Synchronizing a distributed system involves hardware and software synchronization. Optionally, you can synchronize the entire system to an external time reference such as 1588, GPS or IRIG.
NI VeriStand's configuration based environment allows creation of a diverse synchronized system consisting of many different kinds of I/O on 1 or more execution targets. To learn more, visit Building Synchronized NI VeriStand Systems.
Data logs from NI VeriStand come in a variety of formats. Ranging from single point data to XNET raw frames to high speed waveform data from one or more targets. Combining and viewing the data in these logs is a challenge due to the variety of technologies and data formats. DIAdem is a powerful tool that can make this process painless. Viewing Time Correlated NI VeriStand Data Logs provides a tutorial including a time alignment DIAdem SCRIPT, example files, and step by step instructions.
With NI VeriStand, you can configure real-time I/O, stimulus profiles, data logging, alarming, and other tasks; implement control algorithms or system simulations by importing models from a variety of software environments; build test system interfaces quickly with a run-time editable user interface complete with ready-to-use tools; and add custom functionality using NI LabVIEW, NI TestStand, ANSI C/C++, .NET, Python, and other software environments.
By taking advantage of NI VeriStand, you can easily create a distributed HIL, test cell, real-time test, or monitoring system using the out-of-the-box multitarget features.