How to Make Distributed Measurements Using Ethernet

The next step in cutting-edge data acquisition could be a system that optimizes the advantages of Ethernet capabilities.

The economy, speed, and virtually unlimited distance potential of Ethernet-based communications continue to fuel the growth of corporate networking. These same advantages contribute to the increasing use of Ethernet for distributed measurement applications.

Ethernet and Transmission Control Protocol/Internet Protocol (TCP/IP) offer performance and cost advantages over RS-232, RS-422, and GPIB interface technologies for distributed data acquisition applications. This is particularly true for large enterprises that must share measurement data across several departments. These protocols also make it possible to access data acquisition data over the Internet.

Even though data acquisition hardware now is available with Ethernet connectivity, there still are many data acquisition cards, external data acquisition systems, and instrument racks set up the way they have always been—close to corresponding computer systems and the sensors and signal sources being monitored and communicating by older methods. What’s more, these data acquisition solutions typically offer limited measurement resolution (12 b to 16 b), which can lead to expensive false failure errors in production monitoring applications.

Even if their resolution were improved, the overall usefulness of these systems still would be limited by the shortcomings of traditional communications methods. For example, RS-232 serial interfaces, while standard on many computers, are slow and limited to one device.

GPIB (IEEE 488) has been used for instrument communications for years. Although placing GPIB-equipped instrumentation at each monitoring point can increase accuracy, this is expensive for large distributed data acquisition systems. GPIB adapter cards can range from $300 to $500 or more and add maintenance and troubleshooting complexity. GPIB cabling also can be quite expensive and is limited to three meters or less.

To set up a multipoint measurement system, both PC-based data acquisition and traditional instruments require a dedicated PC and software for each point. It becomes very costly and difficult to maintain this kind of system as it becomes larger.

A better approach integrates an Ethernet interface directly into the instrumentation. Ethernet cabling is inexpensive, expander hubs are less than $100, and an Ethernet network interface card costs about $20. Today’s DMM-based data acquisition systems with built-in Ethernet offer convenience, ease of use, and high-speed data transfer. Setting them up is simple and quick. They also provide superior measurement capability, as shown in Table 1.

Table 1. Comparison of Traditional and Ethernet-Based Data Acquisition Systems
Criteria Traditional Solutions Ethernet-Based DMM/DAS
Resolution Data acquisition cards and dataloggers with 10, 12, 14, or 16 b of resolution (3½ to 4½ digits) DMM-like data acquisition system with 22-b (6½-digit) resolution
Storage Capacity Data acquisition cards—use PC memory or on-card FIFO Data capacity depends on RAM Buffer capacity of 400,000 readings or more
Processing PC processor and software or self-contained processor and firmware Onboard processing, timing, signal conditioning, and math functions
Interfaces Data acquisition cards—straight to PC bus
Dataloggers and instruments—proprietary interface cards, GPIB,RS-232, and parallel
Ethernet—simple connection via standardized networking connectors
Secondary RS-232 interface included for non-Ethernet applications
Transfer Speed Sustained rates via GPIB of 1 MB/s 10- or 100-Mb/s Fast Ethernet

Timing and Control Precision

Despite the advantages of Ethernet, building a measurement system around it takes more than just adding an Ethernet interface to an existing instrument. For starters, precise timing and control become more difficult to achieve because Ethernet is nondeterministic. A certain maximum response time cannot be guaranteed. Windows also is nondeterministic.
The best way to get the required timing precision is to ensure the data acquisition system’s timing hardware operates independently of the PC and the network. The data acquisition system should handle the conditional logic, triggering, and other supporting control functions. Many applications depend on preprogrammed alarm limits and analog triggers to allow automatic notification when critical events occur, and the instruments must assume more of the burden for these services in an Ethernet-based system.

The size of the data blocks the system will carry can have a major impact on its speed. Ethernet has a fixed overhead of 30 ms.

GPIB’s overhead is less than 10 ms for a single point, which means Ethernet can transfer large blocks of data more efficiently than small blocks. To take advantage of that, make sure the system’s data buffer is large enough. The larger buffer allows the system to hold more data without the need for frequent PC intervention or tying up the network.

Putting the Network Together

Connecting Ethernet-enabled devices requires installing and configuring network interface cards (NICs) in a PC controller, installing the TCP/IP, and setting up TCP/IP addresses. An Ethernet hub also may be needed.

This simple device repeats anything it receives from one port, making that data available to all its other ports. But the first step is choosing a network topology or connection type. Both present needs, and future plans will determine which of the four main configurations to use.

One-to-One Connection

One-to-one connection, the simplest of all arrangements, is used with one instrument and a single NIC. The two are connected with a network crossover cable, which has its receive (RX) and transmit (TX) lines crossed to allow the receive line input to be connected to the transmit output on the network interface.

One-to-Many Connection

An Ethernet hub makes it possible to connect a single NIC to as many Ethernet instruments as the hub can support (Figure 1). Straight-through (noncrossover) cables are required for hub connections. A hub connection allows easy expansion of measurement channels when test requirements exceed the capacity of a single instrument. It can be used with an isolated instrumentation network or a corporate network attached to the hub.

Dual NICs for Independent Networks

Interconnecting independent corporate and instrumentation networks requires two NICs in the PC controller (Figure 2). However, stations on the corporate network can access the instrumentation and vice versa through the same computer.

Enterprise Network Connections

Enterprise network connections use the existing network infrastructure to connect instruments to the PC controller (Figure 3). This requires network resources from the network administrator, who will provide the necessary settings. Failing to do this could cause network problems at other locations.

Usually, instruments are kept inside the corporate firewall, but the administrator could assign resources that allow their use outside the firewall. With appropriate security methods, it’s possible to control data collection and distribution from virtually anywhere.

Configuring Instruments

TCP/IP

A PC software driver or socket connection can be used for instrument control along with an appropriate communications protocol that defines data exchanges between the PC and instruments. Regardless of the network connection, each instrument and its location on the network must be identified.

Generally, Ethernet-based instruments use the TCP/IP to communicate with other hosts on the network. A host is defined as any device that can transmit and receive IP packets. This includes instruments, workstations, servers, and routers. Each host is assigned a unique 32-b logical address.

IP Addressing

There are two ways to assign an IP address, either or both of which may be available with an Ethernet-ready instrument. For a network server running Dynamic Host Configuration Protocol (DHCP), the IP address is assigned each time the host connects to the network. Corporate networks typically use this addressing scheme.

The other method is static IP addressing, which is used in the majority of isolated networks. A static IP address is assigned by the user and stays the same each time the host connects to the network.

The IP Address

An IP address is 32 b wide and divided into two main parts: a network ID number and host ID number. The address is expressed as four decimal segments separated by periods. Valid addresses range from 0.0.0.0 to 255.255.255.255. Each segment represents the decimal value of that segment’s 8-b byte. The way these four segments are assigned for host and network ID depends on the class of network being used (Table 2).

Table 2. Network Classes Defined by IP Address and Subnet Mask Combinations
Network Class First Byte IP Address* Subnet Mask Available Subnets Available Hosts
A 1 to 126 nnn.hhh.hhh.hhh 255.0.0.0 126 16777214
B 128 to 191 nnn.nnn.hhh.hhh 255.255.0.0 16384 65534
C 192 to 223 nnn.nnn.nnn.hhh 255.255.255.0 2097151 254

* Note: In the IP address format, n is a network ID position, and h is a host ID position. The true definition of network classes also includes the value of the first byte. This can be important when subnetting networks together.

In TCP/IP, a subnet mask separates the network ID from the host ID. The subnet mask looks like an IP address but sets a data bit high for each position of the IP address that makes up the network ID. Three different classes of network are defined with the IP address and subnet mask.

Class C networks, the most common, use the subnet mask 255.255.255.0. The first three bytes are the network ID number and the last byte is the host ID on the network. Host ID numbers 1 through 254 are available for assignment.

All hosts on the same isolated network must have the same subnet mask. As a general rule, the top and bottom host numbers are reserved. The top one (nnn.nnn.nnn.255) is the broadcast address, and the bottom one (nnn.nnn.nnn.0) is shorthand for the whole subnet.

The network ID must be unique among all subnets connected to the Internet or corporate intranet. If the subnet is connected to the public Internet, then the network ID must be obtained from the Internet Network Information Center, which assigns and preserves unique IDs. Each host ID must be unique among all the hosts on the same network.

Conclusion

Ethernet connectivity makes it simple to put together a data acquisition system that can share data with all parts of the enterprise and even on the Internet. Today’s combination DMM/data acquisition systems with built-in Ethernet capability make this even easier and can provide greater measurement precision and improve manufacturing performance and yield.

About the Author

Qi Wang, Ph.D., is the product manager with the High Reliability Group of Keithley Instruments and previously was the company’s lead applications engineer with the Semiconductor Business Group. Dr. Wang, who has 13 years of experience in semiconductor physics, RF/microwave electronics, and optical physics, received a Ph.D. from Texas A&M University in experimental physics and a B.S. in physics from Beijing Normal University. Keithley Instruments, 28775 Aurora Rd., Cleveland, OH 44139, 800-552-1115, e-mail: [email protected]

For More Information on an Ethernet-based DMM/data acquisition system www.rsleads.com/303ee-176

Putting Together an Isolated Instrument Network

Here are the steps to take when setting up a simple isolated Class C network for communicating with two Ethernet-equipped instruments. The network is similar to Figure 2 but without the corporate network connection. The network is isolated, so this example will use static IP addresses.

First, connect the hub to a properly configured NIC in the PC. Next, create static IP addresses for the three hosts: the NIC and two instruments. This is a Class C network, so the subnet mask is 255.255.255.0. From Table 1, note that the first three parts of the IP address make up the network ID. For this example, a network ID of 192.68.0 is used.

Next, allocate the host ID portions of the three IP addresses. For this example, assign a host number of 1 to the NIC, a host number of 10 to the first instrument, and a host number of 20 to the second instrument (Table 3).

If using Windows, install the NIC’s IP address with the Windows Control Panel. The exact steps differ somewhat for each version of Windows. However, the typical way is to open the Network folder in Control Panel and double-click on the appropriate TCP/IP component for the NIC being used. Then, enter the IP address and subnet mask in the spaces provided. For an isolated network, the default gateway and domain naming system (DNS) settings are not used. Reboot the PC as necessary.

Finally, assign the other two IP addresses to the instruments. To perform this step, consult the instruction manual for each instrument. It’s a good idea to record IP addresses especially when changing network settings on the PC or they may be lost.

After assigning the IP addresses, verify proper functioning of the instruments and network. Some instruments have a web page built into firmware, which allows fast setup and verification of proper operation.

Table 3. Host IP Addresses for Isolated Network Example
Host IP Address
NIC 192.68.0.1
1st Instrument 192.68.0.10
2nd Instrument 192.68.0.20

To access the web page, start the PC’s web browser and enter the IP address in the URL address line. The IP address for the first instrument is 192.68.0.10 (Table 3). Once the web page loads, there should be a button to initiate measurements, such as take readings. Click this button, and make sure data is being displayed on the web page. If unable to establish communications, ensure all network settings are correct.

Return to EE Home Page

Published by EE-Evaluation Engineering
All contents © 2003 Nelson Publishing Inc.
No reprint, distribution, or reuse in any medium is permitted
without the express written consent of the publisher.

March 2003

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!