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

Document Type: Tutorial
NI Supported: Yes
Publish Date: May 7, 2007

Using Time-Triggered Networks to Communicate Deterministically Over Ethernet with the LabVIEW 8 Real-Time Module

14 ratings | 3.36 out of 5
Print

Overview

National Instruments real-time software and hardware tools include the LabVIEW Real-Time Module and off-the-shelf embedded hardware targets such as PXI, CompactRIO, and Compact FieldPoint. This real-time platform is used to solve applications that require deterministic operation, increased reliability, and autonomous operation.

With the LabVIEW 8 Real-Time Module, the NI real-time platform takes a technological step that solves more sophisticated applications using a time-triggered network for deterministic transfer of data across Ethernet networks. This document gives a synopsis of the time-triggered network functionality of LabVIEW Real-Time.

Distributed Applications Requiring Deterministic Communication

The tremendous growth in the number of computing devices as well as physical buses and networks connecting such devices has made distributed systems a logical solution for many applications in design, control, and test. While virtually all distributed systems require communication between the elements of the system, a subset of these systems require the communication to be deterministic. These distributed applications may include:
  • Distributed motion control
  • Industrial control and monitoring
  • Hardware-in-the-loop simulation
  • Software-in-the-loop simulation
  • Synchronized data acquisition

For example, a fly-by-wire aircraft simulation may require a flight control simulator to communicate a new angle parameter to the rudder control simulator. The rudder must receive the latest angle parameter within a fixed amount of time; otherwise the response of the rudder will be late and the flight control system will fail. Buffering of data on the network does not alleviate the issue, because buffered data is useless in a dynamic system such as an aircraft. A fly-by-wire simulation is an example that falls on the extreme side of the network response spectrum, shown in Figure 1. Industrial control systems have similar requirements when I/O and processing is distributed among nodes. To meet the requirements of these applications, the network itself must have a real-time (deterministic) response.


[+] Enlarge Image
Figure 1: Network response requirements by application

Deterministic Ethernet with the LabVIEW Real-Time Module

With LabVIEW 8 – the graphical programming platform for design, test, and control – and the LabVIEW Real-Time Module, National Instruments introduces a new technology for deterministic data transfer over Ethernet called the time-triggered network. This feature makes it possible to overcome the inherent lack of determinism of Ethernet networks by applying strict rules to data transmission timing. These “rules” are implemented by a master node that schedules network traffic and synchronizes a network clock between all network nodes.

With the time-triggered network, two or more LabVIEW Real-Time PXI or PC targets can transfer data deterministically over a private Ethernet network using off-shelf-network interfaces. With this technology, network loops can be closed at network rates approaching 5 kHz. Each PC is also connected to a public network for normal network traffic and communication with additional network nodes.

Figure 2: Time-triggered networks use a dedicated private network to transfer data

Transferring Data with Shared Memory Blocks

With a time-triggered network, there are two ways data can be transferred – via shared memory blocks or dedicated slot variables. Shared memory blocks take all the data from one node and reflect it to all other nodes as one packet. The data values are created as LabVIEW time-triggered shared variables.

Figure 3: Shared variables can be configured to be part of a time-triggered network

To configure the network, one node is designated as the master node while all other nodes are slaves. The period of each network cycle is also configured to be between
100 µs and 100 ms. In the example shown in Figure 4, the network cycle has been configured to be 500 µs. At the start of each cycle, the master node sends a cycle start packet to the slave nodes. Once the start cycle packet has ended, other network transfers can be scheduled.

Using one packet to transfer multiple shared variables reduces the overhead per transfer. The packets from each node are scheduled successively so they do not collide. For example, in Figure 4, the node named “RT I/O System” is scheduled to transfer all of its data 100 µs following the start of the network cycle. The length of the transmission will depend on the size of the data.

[+] Enlarge Image
Figure 4: Shared memory blocks "reflect" data to other nodes

A software application executing on a real-time node can be programmed to receive an interrupt when a particular shared memory block has been updated. Figure 5 shows how the timing source can be used in conjunction with timed loops to process data as soon as it has been reflected to the network.


[+] Enlarge Image
Figure 5: Use timing sources to trigger events on other network nodes

Transferring Data with Dedicated Slot Variables

Time-triggered shared variables also can be configured as dedicated slot variables. When using this method, the user explicitly schedules when each shared variable will be transferred during the network cycle. Figure 6 shows the Throttle shared variable as a dedicated slot variable, instead of a member of a shared memory block. This shared variable will be sent 175 µs after the start of the network cycle and the transmission will take 33 µs. Note that all transmissions use a minimum of 33 µs.


[+] Enlarge Image
Figure 6: Dedicated slot variables are scheduled to be sent at specific times during a network cycle

With dedicated slot variables, a loop can be closed in one network cycle. In Figure 6, all nodes will have received the Radar Simulator shared memory block and the RT I/O System shared memory block 130 µs into the network cycle. The master node has 45 µs between receiving the shared memory blocks (t=130) and the scheduled transmission of the Throttle shared variable (t=175) to process the data and produce a value for Throttle. Using dedicated slot variables, users can solve advanced applications that require a loop to be closed using a network.

Conclusion: Time-Triggered Networks Meet Advanced Application Requirements


With the time-triggered features of the LabVIEW Real-Time Module, users can develop advanced applications requiring deterministic transfer of data across an Ethernet network. This technology extends the reach of applications that can be handled with virtual instrumentation.

For a demonstration of LabVIEW Real-Time, to request a visit from your local field engineer, or to attend a FREE LabVIEW Real-Time Hands-On seminar, contact National Instruments at (800) 433-3488 or visit ni.com/realtime.
Related Links:
National Instruments Real-Time Software and Hardware
14 ratings | 3.36 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/).