1. Introduction to LAN
LAN is one of several buses used to connect instruments to a PC. While there have been many claims that LAN(or other buses) are ideal for all applications, the reality is that each bus has different strengths and real-world systems take advantage of multiple buses in a unified software framework. In particular, LAN is well-suited for distributed applications, but not necessarily for desktop measurements or automated test. This paper will examine LAN in detail as it pertains to instrument control. An emerging standard for LAN-based instruments, LXI (LAN eXtensions for Instrumentation) will also be discussed.
LAN, or Ethernet, was designed as computer networking standard. It is a ubiquitous connection that we all use to connect to other PCs and to the Internet. Its most obvious strength is in the distance allowed between connections, which is practically limitless through the use of LAN switches and routers. This capability is crucial when systems need to distribute measurements over a long distance, or to put measurement instruments close to a source, but far away from a controlling PC. With a properly configured secure network, LAN can also be used for remote diagnostics; for example to view the configuration of an instrument in a remote test location.
LAN is also useful in distributed processing systems. Multiple processing elements can be tied together elegantly over a LAN network and communicate with each other as peers. For example, a very high-performance analysis application can offload different processing tasks to multiple PCs connected over LAN to scale the processing performance. Or in a distributed datalogging application, each local node can perform datalogging and control and stream only the necessary data over the network to a supervisory control system.
Finally, LAN is an attractive choice for instrument control because, like USB and previously like RS-232 and the Parallel Port, it comes standard on virtually all desktop PCs.
On the other hand, when used in non-distributed such as in desktop or rackmount use, LAN has a number of weaknesses. These include:
- Long latency
- High processing overhead and cost
- Complex configuration
- Lack of LAN instruments
Throughput across a bus is determined by both the latency and the bandwidth of the bus. Latency measures the delay of transmission of data, while bandwidth measures the rate at which data is sent across the bus, typically in MB/s. Lower latency improves the performance of applications that require a large number of small commands or data sets to be transferred. Higher bandwidth is important in applications such as waveform generation and acquisition. Figure 1 compares the latency and bandwidth of various instrumentation buses. Note that improving or increasing bandwidth moves up while improving or decreasing latency moves to the right. While higher speed variants such as Gigabit LAN have enough bandwidth for many applications, the latency of LAN is among the worst of any bus technology, limiting its performance in many instrumentation applications. For example, in a common DMM/Switch application benchmark shown in Figure 2, a LAN interface had significantly poorer performance than USB or GPIB.
Figure 1: LAN provides good bandwidth but poor latency performance which can limit its applicability to certain applications.
(LAN, USB, and GPIB data performed on Agilent 34980A, PXI data performed on NI PXI 4070, NI PXI 2532)
In data intensive applications, LAN communication requires significant processing as the protocol stack is implemented in software. A common rule of thumb is the “bit per hertz” rule1; a rough estimate of the CPU processing required to handle a given Ethernet link speed is, for every one bit per second of network data processed, one hertz of CPU processing is required. Using this rule, a Gigabit LAN connection takes up about a Gigahertz of processing on a modern desktop processor when streaming at full rate. Thus, in high-speed systems, the CPU may have to devote more processing to the communications link than to the actual application. This can be a bottleneck in systems requiring high data throughput, such as modular systems that rely on the data bus to stream data back to a host processor.
The processing overhead on LAN can increase the cost of a LAN instrument in two ways. First, in high-speed systems, a desktop or server class processor will likely be required to process the TCP/IP stack. Second, when real-time data rates can not be achieved over LAN, the instrument designer must instead embed processing for data reduction into the instrument. This raises cost and also reduces user flexibility.
Another weakness of LAN is the setup required to establish a LAN network. While for complex applications this is may not be a concern, it can be a burden when compared to USB in desktop applications. LAN requires an IP address and other network configuration and may be subject to IT policies of the network on which it is installed. In fact, many of the benefits of remote diagnostics of a LAN instrument may be negated by a company’s particular IT policy with regards to firewalls and other network security.
Even though Ethernet has been around longer the GPIB, and used in instrument control for at least 15 years, it remains a niche bus in instrument control; there are still only a few hundred LAN instruments compared to over 10,000 GPIB-controlled instruments.2 Today, LAN is used primarily for systems where a long distance between instruments is a requirement. For desktop applications, GPIB and USB are most often used, and in validation and production, GPIB and modular systems such as PXI (PCI eXtensions for Instrumentation) are the most popular choices. Of course, many systems combine multiple different buses into a hybrid system where the actual instrument interface is abstracted in the software.
2. LXI-compliant LAN Instruments
In 2005, a group of test and measurement vendors released a specification for a standard called LXI. LXI adds some additional features to standalone LAN instruments, such as a standard HTML configuration page, and several best practices for implementing LAN instruments. LXI also adds optional timing and synchronization features including IEEE-1588 Precision Time Protocol and a bused Hardware Trigger (These features are required in certain classes of LXI instruments). Figure 3 compares the features of LXI with existing LAN instruments.
|Feature||Existing LAN Instruments||LXI Instruments|
|Web Configuration Panel||Optional/Typical||Required|
|IVI-compliant Instrument Driver||Optional/Typical||Required|
|Bused hardware trigger||Optional||Optional (Required for Class A)|
|IEEE-1588||Optional||Optional (Required for Class A,B)|
Figure 3: A Comparison of LAN and LXI instrument features.
IEEE-1588 allows synchronization over a LAN network. Using specialized LAN hardware, IEEE-1588 devices are capable of achieving synchronization in time of within +-100 ns. This capability makes IEEE-1588 attractive for applications with relatively low acquisition rates (below 1 MS/s) that require synchronization over large distances. The LXI Hardware Trigger bus is a shared set of LVDS (Low-Voltage Differential Signaling) that provide greater synchronization accuracy over shorter distances using specialized cabling.
Most LXI instruments will look very similar to existing LAN implementations, in fact, a majority of current LXI devices are updated versions of existing products. LXI devices that implement the optional synchronization capabilities are well-suited to applications that require instruments to be distributed over large distances.
3. Choose the best of each bus through a hybrid system
Real-world systems use multiple bus technologies within a modular system architecture to take advantage of the best attributes of each system. For example, you can architect a PXI based system with high-speed acquisition and generations that connects to existing GPIB and USB instruments and serves data to other applications over LAN. When purchasing instruments, make sure the instrument comes with an instrument driver so that you can easily architect a hybrid system in your software of choice.
|For more information, view the Hybrid Systems: Integrating Your Multi-Vendor, Multi-Platform Test Equipment whitepaper and the Instrument Bus Performance: Making Sense of Competing Bus Technologies for Instrument Control whitepaper.|
1: Yeh, Eric et. al., Introduction to the TCP/IP Offload Engine, 10 Gigabit Ethernet Alliance, April 2002
2: Instrument driver data from ni.com/idnet
5. Relevant NI Products and Whitepapers
National Instruments, a leader in automated test, is committed to providing the hardware and software products engineers need to create these next generation test systems.
- NI TestStand Test Management Framework
- LabVIEW Graphical Programming Environment
- Signal Express Interactive Measurement Software
- Modular Instruments (Oscilloscopes, Multimeters, RF, Switching, and more)
- Data Acquisition
- PXI System Components (Chassis and Controllers)
- Instrument Control (GPIB, USB, and LAN)
Test System Development Resource Library
National Instruments has developed a rich collection of technical guides to assist you with all elements of your test system design. The content for these guides is based on best practices shared by industry-leading test engineering teams that participate in NI customer advisory boards and the expertise of the NI test engineering and product research and development teams. Ultimately, these resources teach you test engineering best practices in a practical and reusable manner. Download guides from the Test System Development Resource Library.