Text preview for : 10005-1,3.pdf part of Keithley 10005-1,3 Keithley 2001M CDROM Digital Multimeters - Data Acquisition - Switch Systems Product Information CD_Content pdfs app_notes 10005-1,3.pdf



Back to : 10005-1,3.pdf | Home

Network Primer and Programming
Tutorial for the Model 2701 Ethernet-
Based DMM/Data Acquisition System
Introduction faces, the Model 2701 offers options other than simply con-
Keithley's Model 2701 is the industry's first multipoint mea- necting the instrument directly to a PC controller in a closed
surement and control system that fully integrates instrument- loop. The Model 2701 can be connected to a TCP/IP network
quality resolution and sensitivity with Ethernet long distance using its own subnetwork, or it can be connected directly to
networking capability. Its 61/2-digit (22-bit) measurement an existing network, including a corporate intranet.
resolution is typically found on benchtop instruments that
have only GPIB and RS-232 interfaces. Now, engineers and
scientists can make sensitive measurements in a distributed
data acquisition environment where long distance, industry-
standard communications are needed.
The Model 2701 can be used on a 10BaseT or 100BaseT
Ethernet network. As with other Ethernet devices, this
requires the installation and configuration of associated net-
work interface cards (NICs) in a PC controller, installation of Figure 1. One-to-one connection with a crossover cable
the TCP/IP protocol, and setting up TCP/IP addresses. This
One-to-One Connection--A network crossover cable
network primer is a short tutorial on how to accomplish these
connection is similar to a typical RS-232 hookup using a null
steps. Appendix B provides a glossary of networking termi-
modem cable. The crossover cable has its receive (RX) and
nology.
transmit (TX) lines crossed to allow the receive line input to
Setting Up Network Configurations be connected to the transmit output on the network inter-
Ethernet is a type of Local Area Network (LAN) that works faces. With the Model 2701, this is only done when one
with a variety of transmission media. Some of the more pop- instrument is being connected to a single NIC.
ular variations are 10/100BaseT, 10Base2, and 10BaseF,
which use unshielded twisted pair (UTP), coaxial cable, and
optical fiber respectively.
The Model 2701 is designed for a 10/100 BaseT network
and uses a standard RJ45 connector. This is an eight-wire con-
nector, but only four wires are used: one pair to transmit and
one pair to receive data. A 10BaseT network can accommo-
date transmission speeds up to 10Mbits/second; 100BaseT
operates at up to 100Mbits/second. Both types of networks
usually require Ethernet hubs to make connections. The
exception is a one-to-one connection using a crossover cable.
Figure 2. One-to-many connection scheme using a network
When using Ethernet to collect and distribute test data, hub
the first step is deciding which connection scheme is most
convenient. Unlike instruments with GPIB and RS-232 inter-




A G R E A T E R M E A S U R E O F C O N F I D E N C E
One-to-Many Instruments Connection--With an wall, but the network administrator could assign resources
Ethernet hub, a single NIC can be connected to as many that allow them to be outside the firewall. This would allow
Model 2701s as the hub can support. This requires straight- a Model 2701 connection to the Internet using appropriate
through network (non-crossover) cables for hub connections. security methods. Thus, data collection and distribution
The advantage of this method is easy expansion of measure- could be controlled from virtually any location.
ment channels when test requirements exceed the capacity of
a single instrument. With only Model 2701s connected to the TCP/IP Protocol
hub, this is an isolated instrumentation network. However, The Basics--Regardless of the type of network connection
with a corporate network attached to the hub, the Model used, there must be a way to identify each instrument and its
2701s become part of the larger network. location on a network. A software driver installed in the PC
provides the means of controlling the instrument. A data
communication protocol defines the method of exchanging
instructions and data between the PC and each instrument.

WARNING
When connecting to a corporate network, the
network administrator MUST provide all of the
network settings to the Model 2701. Failure to
use settings provided by the network adminis-
trator could result in failures at other locations
on the corporate network. Failure to work
through the network administrator could also
Figure 3. Use of two NICs for connections to a corporate net- be considered a breach of company policy.
work and instrumentation hub.
Always consult with the network administrator
before attempting to connect instrumentation
Dual NICs for Independent Networks--When it is
to the network.
desirable to interconnect independent corporate and instru-
mentation networks, two NICs are required in the PC con-
The Model 2701 uses the TCP/IP protocol to communi-
troller. While the two networks are independent, stations on
cate with other hosts on the network. A host is defined as any
the corporate network can access the instrumentation, and
device on the network that can transmit and receive IP pack-
vice versa, using the same computer. This configuration
ets. In addition to the Model 2701, this includes worksta-
resembles a GPIB setup in which the computer is connected
tions, servers, and routers. Each host on a TCP/IP network is
to a corporate network, but also has a GPIB card in the PC to
assigned a 32-bit logical address that is unique to that host.
communicate with instrumentation.
IP Addressing--No two hosts on a network can have the
same IP address. There are two ways of assigning an IP
address to a host. For a network server running Dynamic
Host Configuration Protocol (DHCP), a network resource
such as an IP address is assigned each time the host connects
to the network. Typically, this type of IP addressing is used
for corporate networks, and is supported by the Model 2701.
The other method is called static IP addressing and is used in
the majority of isolated networks. The Model 2701 also sup-
ports static addressing.
Static IP addressing means that network settings assigned
to a host stay the same each time it is connected to the net-
Figure 4. Instrumentation connection to enterprise routers or work. When setting up Model 2701s on an isolated network,
servers.
it usually is the user's responsibility to configure the network
Enterprise Network Connections--This connection settings for those hosts. Thus, the user assigns the unique
scheme uses an existing network infrastructure to connect logical address for each instrument.
Model 2701s to the PC controller. In this case, the network The IP address is 32 bits wide and is divided into two
resources must be obtained from the network administrator. main parts: a network ID number and a host ID number. The
Usually, the instruments are kept inside the corporate fire- address is expressed as four decimal numbers separated by



2
periods. Valid addresses range from 0.0.0.0 to the PC. The NIC and its driver must be properly installed on
255.255.255.255, for a total of about 4.3 billion unique the computer according to the manufacturer's instructions.
addresses. Each of the four numbers represents the decimal
value of the numbers' 8-bit bytes. The way these four num- The next step is to create IP addresses for the three hosts
bers are assigned for host ID and network ID depends on the (the NIC and two Model 2701s) on the network. This is a
class of network being used. Class C network, so the subnet mask will be 255.255.255.0.
From Table 1, note that the first three parts of the IP address
The network ID must be unique among all network sub- make up the network ID. For purposes of this example, a net-
nets that connect to the Internet (or corporate intranet). If the work ID of 192.68.1 is used, which is the default network ID
subnet will in fact be connected to the public Internet, then that is shipped with the Model 2701. (If a corporate network
the network ID must be obtained from the Network Informa- is also connected to the same computer using dual NICs, the
tion Center, which assigns and preserves unique IDs. In any instrumentation network ID must be different than the cor-
case, each host ID must be unique among all the hosts on the porate network ID.) Next, the host ID portions of the three IP
same network (which presumably has a unique network ID addresses are assigned. In this example, a host number of 1
number). is assigned to the NIC; the first Model 2701 is assigned a
In the TCP/IP protocol, a Subnet Mask separates the net- host number of 10; the second Model 2701 becomes host
work ID from the host ID. The Subnet Mask looks like an IP number 20. The complete IP addresses are listed in Table 2.
address, but sets a data bit high for each position of the IP
address that makes up the network ID. Three different class- Table 2. Host IP addresses for text example.
es of network are defined with the IP address and subnet
mask, as shown in Table 1. Host IP Address

NIC 192.68.1.1
Table 1. Network classes defined by IP address and subnet
mask combinations. First 2701 192.68.1.10

Network IP Subnet Available Available Second 2701 192.68.1.20
Class address Mask Subnets Hosts
A nnn.hhh.hhh.hhh 255.0.0.0 126 16777214
In a Windows operating system, install the NIC's IP
B nnn.nnn.hhh.hhh 255.255.0.0 16384 65534
address with the Windows Control Panel. The exact steps dif-
C nnn.nnn.nnn.hhh 255.255.255.0 2097151 254
fer somewhat for each version of Windows. See Appendix A
Note: In the IP address format, `n' is a network ID position, and `h' for details. The final step is to assign the other two IP address-
is a host ID position. For simplicity, the first byte definition has
been omitted from the table. Refer to the network manual for fur- es to the Model 2701s. Details are covered in the Model 2701
ther details. instruction manual*. It's a good idea to record IP addresses so
they can be easily found when needed. This is especially
Class C networks are the most common and use the sub- important when changing the existing network settings on the
net mask 255.255.255.0. The first three bytes are the network computer; otherwise, those settings will be lost.
ID number and the last byte is the host ID on the network.
Host ID numbers 1 through 254 are available for assignment. Assign a unique IP address to each of the Model 2701s in
All hosts on the same isolated network must have the same the network in turn. Next, verify that the Model 2701 and the
subnet mask. As a general rule, the top and bottom host num- network have been set up and are working properly. The Web
bers are reserved. The top one (nnn.nnn.nnn.255) is the page built into the Model 2701 allows verifying the system
broadcast address and the bottom one (nnn.nnn.nnn.0) is setup quickly and easily. To access this page, start the com-
shorthand for the whole subnet. puter's web browser (Internet Explorer v5.0 or higher only)
and enter the IP address in the URL address line. In the exam-
Setting Up an Isolated Instrument ple in Table 2, the IP address for the first Model 2701 is
Network 192.68.1.10. Once the web page loads, click the "Take Read-
The following paragraphs describe how to set up a simple ings" button and the Model 2701 data should also be displayed
isolated Class C network for communicating with two Model on the Web page. If unable to establish communications,
2701s. This network example is similar to Figure 2, but double-check the network settings and try again.
without the corporate network connection to the hub. * As part of the Model 2701 IP address installation process, the user is asked
The standard Ethernet hub basically repeats anything it for a default gateway. This is the IP address of the router used to connect
devices on a network. However, an isolated network does not use a router,
receives from one port, making that data available to all its
so a value of 0 is entered for the default gateway. When connecting Model
other ports. Hub connections are made with straight-through 2701s to a company network, the network administrator may supply the
cables. The hub is connected to the network interface card in number that is used for the default gateway.




3
Model 2701 Driver Choices
Once the Model 2701 is set up on a network and
its internal web page is accessible, it's time to
determine the most appropriate method for writ-
ing the Visual Basic code for the application. This
note addresses two of the choices available for
use with the Model 2701--the IVI driver and the
Winsock control. There is also the option to use
the VISA driver with the Model 2701. Although
this application note does not cover the use of the
VISA driver without using the IVI driver, the
Model 2701 is compatible with VISA.
The IVI (Interchangeable Virtual Instruments)
driver uses the IVI Foundation IVIdmm instru-
ment class driver. The IVI Foundation was char-
tered to define a set of interchangeable instrument
driver models. The IVI driver is built on the VISA Figure 5. Location of installed example programs
interface layer. The VISA layer manages the bus
interface and allows seamless interchangeability
between GPIB, RS-232, and Ethernet. IVI drivers provide example, the IVI driver has a steep initial learning curve. The
hardware independent programming syntax for products that driver uses function calls, so the syntax is totally different than
perform the same functions. The goal of the IVI drivers is to programming using SCPI commands. This means that pro-
reduce the overall cost of test by defining standard instru- grammers will need to learn new commands to write their
ment driver programming interfaces to common instrument code. The other disadvantage when using Visual Basic is that
classes. By standardizing on a set of fundamental functions, the interface is not an ActiveX control. The advantage of pro-
settings, and permissible values, products based on the IVI gramming with the IVI driver is that, once the programmer has
Foundation specifications can deliver significant savings to learned the syntax, the syntax remains consistent for program-
test system developers. Standard interfaces offer a variety of
ming different instrument models or instruments from differ-
benefits:
ent manufacturers, as long as the manufacturer uses the IVI