Network Primer and Programming

Tutorial for the Model 2701 EthernetBased DMM/Data Acquisition System
Introduction
Keithley’s Model 2701 is the industry’s first multipoint measurement and control system that fully integrates instrumentquality resolution and sensitivity with Ethernet long distance
networking capability. Its 61⁄2-digit (22-bit) measurement
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, industrystandard 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 network interface cards (NICs) in a PC controller, installation of
the TCP/IP protocol, and setting up TCP/IP addresses. This
network primer is a short tutorial on how to accomplish these
steps. Appendix B provides a glossary of networking terminology.

Setting Up Network Configurations
Ethernet is a type of Local Area Network (LAN) that works
with a variety of transmission media. Some of the more popular 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 connector, but only four wires are used: one pair to transmit and
one pair to receive data. A 10BaseT network can accommodate 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.
When using Ethernet to collect and distribute test data,
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

faces, the Model 2701 offers options other than simply connecting the instrument directly to a PC controller in a closed
loop. The Model 2701 can be connected to a TCP/IP network
using its own subnetwork, or it can be connected directly to
an existing network, including a corporate intranet.

Figure 1. One-to-one connection with a crossover cable

One-to-One Connection—A network crossover cable
connection is similar to a typical RS-232 hookup using a null
modem cable. The crossover cable 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 interfaces. With the Model 2701, this is only done when one
instrument is being connected to a single NIC.

Figure 2. One-to-many connection scheme using a network
hub

M E A S U R E

O F

C O N F I D E N C E

two NICs are required in the PC controller. the instruments are kept inside the corporate fire- 2 Static IP addressing means that network settings assigned to a host stay the same each time it is connected to the network. WARNING Figure 3. the Model 2701s become part of the larger network. with a corporate network attached to the hub. A host is defined as any device on the network that can transmit and receive IP packets. A data communication protocol defines the method of exchanging instructions and data between the PC and each instrument. using the same computer. but also has a GPIB card in the PC to communicate with instrumentation. Thus. When setting up Model 2701s on an isolated network. This configuration resembles a GPIB setup in which the computer is connected to a corporate network. While the two networks are independent. This would allow a Model 2701 connection to the Internet using appropriate security methods. data collection and distribution could be controlled from virtually any location. wall. Enterprise Network Connections—This connection scheme uses an existing network infrastructure to connect Model 2701s to the PC controller. There are two ways of assigning an IP address to a host. Usually. IP Addressing—No two hosts on a network can have the same IP address. servers. the network resources must be obtained from the network administrator. The other method is called static IP addressing and is used in the majority of isolated networks. TCP/IP Protocol The Basics—Regardless of the type of network connection used. When connecting to a corporate network. A software driver installed in the PC provides the means of controlling the instrument. Instrumentation connection to enterprise routers or servers. Typically. it usually is the user’s responsibility to configure the network settings for those hosts. With only Model 2701s connected to the hub. this is an isolated instrumentation network. For a network server running Dynamic Host Configuration Protocol (DHCP). and vice versa. a network resource such as an IP address is assigned each time the host connects to the network. The advantage of this method is easy expansion of measurement channels when test requirements exceed the capacity of a single instrument. stations on the corporate network can access the instrumentation. In this case. Failure to use settings provided by the network administrator could result in failures at other locations on the corporate network. and routers. In addition to the Model 2701. Thus. a single NIC can be connected to as many Model 2701s as the hub can support. but the network administrator could assign resources that allow them to be outside the firewall. the user assigns the unique logical address for each instrument. Failure to work through the network administrator could also be considered a breach of company policy. this type of IP addressing is used for corporate networks. However. there must be a way to identify each instrument and its location on a network. the network administrator MUST provide all of the network settings to the Model 2701. Each host on a TCP/IP network is assigned a 32-bit logical address that is unique to that host. The Model 2701 uses the TCP/IP protocol to communicate with other hosts on the network. This requires straightthrough network (non-crossover) cables for hub connections. The Model 2701 also supports static addressing. The IP address is 32 bits wide and is divided into two main parts: a network ID number and a host ID number. Figure 4. and is supported by the Model 2701.One-to-Many Instruments Connection—With an Ethernet hub. this includes workstations. Always consult with the network administrator before attempting to connect instrumentation to the network. Dual NICs for Independent Networks—When it is desirable to interconnect independent corporate and instrumentation networks. Use of two NICs for connections to a corporate network and instrumentation hub. The address is expressed as four decimal numbers separated by .

but sets a data bit high for each position of the IP address that makes up the network ID.1 is used. 3 .255. Details are covered in the Model 2701 instruction manual*. Refer to the network manual for further details. as shown in Table 1. It’s a good idea to record IP addresses so they can be easily found when needed. This is especially important when changing the existing network settings on the computer. In the TCP/IP protocol.nnn.nnn. However. note that the first three parts of the IP address make up the network ID.nnn. The next step is to create IP addresses for the three hosts (the NIC and two Model 2701s) on the network.hhh.20 In a Windows operating system.0 to 255. the network administrator may supply the number that is used for the default gateway. The Web page built into the Model 2701 allows verifying the system setup quickly and easily. To access this page. install the NIC’s IP address with the Windows Control Panel. All hosts on the same isolated network must have the same subnet mask.255.68. The first three bytes are the network ID number and the last byte is the host ID on the network. See Appendix A for details. so the subnet mask will be 255. The NIC and its driver must be properly installed on the computer according to the manufacturer’s instructions.1. Each of the four numbers represents the decimal value of the numbers’ 8-bit bytes. The Subnet Mask looks like an IP address.1. those settings will be lost.nnn.hhh 255. For purposes of this example.0.255. Host ID numbers 1 through 254 are available for assignment. (If a corporate network is also connected to the same computer using dual NICs. In any case.0. the first byte definition has been omitted from the table. In this example. the top and bottom host numbers are reserved.68. If unable to establish communications.0) is shorthand for the whole subnet. This network example is similar to Figure 2. Assign a unique IP address to each of the Model 2701s in the network in turn.255. Class C networks are the most common and use the subnet mask 255. The top one (nnn. Valid addresses range from 0.255.3 billion unique addresses.68.hhh.periods. which assigns and preserves unique IDs. each host ID must be unique among all the hosts on the same network (which presumably has a unique network ID number). Table 2. * As part of the Model 2701 IP address installation process.0. When connecting Model 2701s to a company network. The complete IP addresses are listed in Table 2. Hub connections are made with straight-through cables. but without the corporate network connection to the hub. the second Model 2701 becomes host number 20.0. The exact steps differ somewhat for each version of Windows.255.10 Second 2701 192. Host IP addresses for text example. The standard Ethernet hub basically repeats anything it receives from one port. Setting Up an Isolated Instrument Network The following paragraphs describe how to set up a simple isolated Class C network for communicating with two Model 2701s.hhh. The way these four numbers are assigned for host ID and network ID depends on the class of network being used. Network classes defined by IP address and subnet mask combinations. Table 1.255.255. then the network ID must be obtained from the Network Information Center. double-check the network settings and try again. so a value of 0 is entered for the default gateway.hhh 255.68.0 2097151 254 Note: In the IP address format. From Table 1. a Subnet Mask separates the network ID from the host ID.1. which is the default network ID that is shipped with the Model 2701. verify that the Model 2701 and the network have been set up and are working properly.1 First 2701 192. the IP address for the first Model 2701 is 192. The network ID must be unique among all network subnets that connect to the Internet (or corporate intranet). For simplicity. This is the IP address of the router used to connect devices on a network.) Next.0. for a total of about 4. start the computer’s web browser (Internet Explorer v5. the first Model 2701 is assigned a host number of 10. Network Class IP address Subnet Mask Available Subnets Available Hosts A nnn.hhh 255. If the subnet will in fact be connected to the public Internet. the user is asked for a default gateway. click the “Take Readings” button and the Model 2701 data should also be displayed on the Web page.10.255. Host IP Address NIC 192. Three different classes of network are defined with the IP address and subnet mask. otherwise. an isolated network does not use a router. and ‘h’ is a host ID position. Next.1.0 16384 65534 C nnn. The final step is to assign the other two IP addresses to the Model 2701s. In the example in Table 2. ‘n’ is a network ID position. Once the web page loads.255) is the broadcast address and the bottom one (nnn. a network ID of 192.68.255. The hub is connected to the network interface card in the PC.0. a host number of 1 is assigned to the NIC.nnn.nnn. making that data available to all its other ports. This is a Class C network. the instrumentation network ID must be different than the corporate network ID.0 126 16777214 B nnn.0 or higher only) and enter the IP address in the URL address line.nnn. the host ID portions of the three IP addresses are assigned. As a general rule.0.

which operates much like the The Keithley 2701 IVI driver is a superset of the IVI digMScomm object. For 232 interface. instruments. This technique employs SCPI comfunctionality of basic and complex digital multimeters that mands to control the Model 2701 and the Winsock control to can measure scalar quantities of an input signal. once the programmer has Foundation specifications can deliver significant savings to learned the syntax. The advantage of prosettings. This method has advantages DMMs have a single measurement channel. The goal of the IVI drivers is to programming using SCPI commands. The default modifications. particularly for those more familiar with programming in SCPI. RS-232. products based on the IVI gramming with the IVI driver is that. it’s time to determine the most appropriate method for writing the Visual Basic code for the application. and permissible values. This driver class supports the ming in Visual Basic. IVI drivers provide hardware independent programming syntax for products that driver uses function calls. is another method available for programital multimeter class. SCPI commands can’t be used to control a different model or to change to another method of communication. the IVI driver has a steep initial learning curve. the disadvantage of this IviDMM class allow applications developers the option to method is that it is not universal. The facilitating the reuse of test code from R&D to help file can be found in the Keithley program group pictured manufacturing. in as 2701 is a scanning DMM that supports multiple measuremuch as they don’t have to learn new programming syntax ment channels with integrated switches. regardless of the instrumentation in Figure 6. hardware used. The IVI Foundation was chartered to define a set of interchangeable instrument driver models. There are a few things to keep in mind when starting to • Reduced downtime and maintenance costs by allowing use the IVI driver. the Model 2701 is compatible with VISA. but the Model for those already familiar with using SCPI commands. Location of installed example programs interface layer. IviDMM. Also. Keithley’s extensions to the for the Model 2701. This note addresses two of the choices available for use with the Model 2701—the IVI driver and the Winsock control. Standard interfaces offer a variety of ming different instrument models or instruments from differbenefits: ent manufacturers. install location of the example programs is shown in Figure • Accelerated introduction of new products to market by 5. . Typical communicate using Ethernet. consult the help file that installs with the driver. By standardizing on a set of fundamental functions. The other disadvantage when using Visual Basic is that classes. so the syntax is totally different than perform the same functions. The IVI driver is built on the VISA Figure 5. such as RSThe IVI driver does have a few disadvantages. However. The Model 2701 also allows using the same commands providing a consistent programming approach for many with the RS-232 interface as with the Ethernet interface. and Ethernet. This means that proreduce the overall cost of test by defining standard instrugrammers will need to learn new commands to write their ment driver programming interfaces to common instrument code. the syntax remains consistent for programtest system developers. as well as analog and digital output channels. as long as the manufacturer uses the IVI • Reduced programming time and complexity by driver. study the examples that come with instruments to be swapped with minimal or no test code the IVI driver and build on them a little at a time. The IVI (Interchangeable Virtual Instruments) driver uses the IVI Foundation IVIdmm instrument class driver. the interface is not an ActiveX control. Although this application note does not cover the use of the VISA driver without using the IVI driver. The between GPIB. The Winsock control. First. There is also the option to use the VISA driver with the Model 2701.Model 2701 Driver Choices Once the Model 2701 is set up on a network and its internal web page is accessible. The VISA layer manages the bus interface and allows seamless interchangeability example. so a program written with specify channel lists for the IviDMM instrument functions.

Let’s take a closer look at the IVI driver and begin to configure and communicate with the Model 2701. IVI drivers define functions. Each IVI driver class defines a common set of attributes and functions that best model the state and behavior of a broad subset of actual instruments in the defined class. it must comply fully with the syntax that IVI defines for that class. 5 . 3. Select Project/References… on the main VB menu. applications can program the instrument to perform another type of measurement. First. For a driver to belong to an IVI class. the application must supply a channel list with the standard IviDMM functions and attributes. applications can determine the current measurement function of an instrument or. however. To make setting groups of related attributes more convenient. To support basic instruments. Actual instruments. To support advanced instruments. IVI class specifications collect subsets of class attributes and functions into optional “extension groups” that developers may omit from an actual driver. including • AC Measurements • Frequency Measurements • Temperature Measurements • Thermocouples • Thermistors • MultiPoint • Software Trigger The KE2701 does support four-wire RTDs through Keithley extensions to the IviDMM attributes and functions. such as KE2701_ConfigureMeasurement. View the type library (KE2701) using VB’s Object Browser (View/Object Browser on the main menu or F2). The KE2701 also has complete support for Model 2701 features that the IviDMM specification does not define. When the application either calls the KE2701 using an IviDMM class driver or calls the KE2701 functions directly. Refer to the Help file in the configuration panel for detailed information on the Model 2701 setup. 2. Applications can read or write the attributes to modify or query the current state of the instrument. By reading the KE2701_ATTR_FUNCTION attribute. Microsoft Visual Basic uses a COM type library to interface to the Keithley 2701 IVI Driver. The Keithley 2701 IVI Driver (KE2701) supports most of the IviDMM extension groups. Class compliance provides application developers opportunities for both instrument interchangeability and a shorter learning curve when using new instruments with IVI drivers. by writing this attribute. To reference the type library in Visual Basic: 1. IVI drivers model the state of an instrument using attributes. Scroll through the Available References list to the entry. such as the Model 2701. The IviDMM specification (see Keithley 2701 IVI Driver Function Summary) divides DMM functionality into a common base capability group and several optional extension groups for advanced functionality. make sure the IVI driver is installed and configured properly by going to the Keithley Instruments program group shown in Figure 6 and opening the Keithley Configuration Panel. single-channel DMM. To use the additional features and channels available on Series 7700 plug-in modules. “Keithley 2701 Multimeter” and check the selection box at the left.• Device Info • Auto Range Value • Auto Zero The KE2701 does not support these IviDMM extension groups: • Resistance Temperature Devices (RTDs) • Trigger/Slope • Power Line Frequency Figure 6. Click OK to close the dialog. Follow the instructions in the Keithley Configuration Wizard to configure the Model 2701 and the resources it uses properly. IVI drivers may implement vendor-specific attributes and functions that support features that the IVI class specification does not address. All signal measurements use the front panel terminals. the KE2701 driver performs as a high end. The IviDMM class functions assume a DMM with a single measurement channel. may have more or fewer features than an IVI class defines. for instance.

• Returns a ViSession handle that can be used to identify the instrument in all subsequent instrument driver function calls. such as “KE2701_GPIB16” or “vinstr->Oven Test” that binds an IVI driver to a hardware resource. CheckError vi. this function resets the instrument to a known state. 6 • Sends initialization commands to set the instrument to the state necessary for the operation of the instrument driver. Look for text and comments in the code that will give explanations about the function calls.caption=”Driver Open” Else Label1. this function queries the instrument ID and checks that it is valid for this instrument driver. The program will configure the first five channels to read a thermocouple and store that reading into the internal memory of the Model 2701. This is done with the use of the KE2701_init or the KE2701InitWithOptions function. vi) If Error=0 then Label1. • Opens a session to the specified device using the interface and address specified for the Resource Name parameter. The constant VI_SUCCESS has a value of zero. The advantage of using the checkerror subroutine is that it will provide a description along with the error number. we will follow this method to stay consistent with the example programs. Only one connection can be open with the unit at a time. Let’s compare the function without using the checkerror. • If the Reset parameter (Parameter 3) is set to VI_TRUE.bas module that is included with all of the example programs. but refer to the Visual Basic Reference in the IVI Help file for detailed information on the syntax of the actual commands. then no error has occurred. positive values mean warning. GPIB. Error = KE2701_init (InstrumentName. vi) If status = VI_SUCCESS Then Label1. therefore. KE2701_init(InstrumentName. The program will offload the readings from the buffer to the program.caption=”Driver NOT Open” End If This function performs these initialization actions: • Creates a new IVI instrument driver session. Review the following example of opening a session. Note that the format that will be followed is the same as the one provided with the sample programs.caption=”Driver Open” Else Label1. and negative values mean errors. If the initialization call succeeds. The first step in using the IVI driver is to open a connection with the Model 2701. Using it without the checkerror will only bring back an error number. If the value is a zero. • Virtual Instrument—user-defined instrument. The following code fragments are pieces of the program that are specific to the IVI driver on the Model 2701. the driver returns a VISA session instrument handle in “vi. Applications can address an instrument using a: • Logical Name—user-assigned alias. which can be set from the user form of the Visual Basic program. These readings will be triggered by the Model 2701’s internal timer. InstrumentName is a variable that has been specified in the IVI driver configuration. • If the ID Query parameter (Parameter 2) is set to VI_TRUE. Performing the init function opens a connection with the Model 2701. This will allow for greater error checking as the program is developed. or Ethernet. The general meaning of error codes is that zero is a success. VI_TRUE. but the difference is how the error is read back. VI_TRUE.caption=”Driver NOT Open” End if Note that the command will be the same. The actual program .” Use this instrument handle in all other KE2701 function calls to reference the instrument the application opened. VI_TRUE. While using the CheckError subroutine is not a requirement. KE2701_close vi Example program using the IVI driver The following example demonstrates how to control a Model 2701 using the IVI driver. There is also a close function that is used in conjunction with the init to manage the connection with the Model 2701. • Hardware Resource—VISA I/O string. the if…then statement is checking to see if the function has succeeded. We will use the syntax of calling the CheckError subroutine that is located in the Util.The Keithley 2701 IVI Driver (KE2701) uses IVI and VISA conventions to reference a specific instrument on either the RS-232. Next. The function will return a value when the function is completed. VI_TRUE. let’s take a close look at the driver and some of the functions and sample code. such as “Oven Test” for a virtual instrument defined in the IVI configuration files. such as “GPIB0::16::INSTR” that defines a hardware I/O connection.

In the FetchMultiReading command. Also. each instrument must be opened using a different instrument handle. “101:105”). This type of programming doesn’t require installing any driver to use with the Model 2701.is available for download from Keithley web site: www. VI_NULL. pointer. KE2700_ATTR_BUF_POINTER_ LOCATION. KE2700_ConfigureMeasurement(KE2700_ ChannelList(vi. KE2700_FetchMultiReading(vi. The pointer variable is used because that is the value of the last reading as returned by the KE2700_ATTR_BUF_POINTER_LOCATION. ‘ Start Scan CheckError vi. “101:105”). KE2700_SetAttributeViInt32(vi.001) ‘ Set internal Timer to 2 sec CheckError vi.68.000 readings. KE2700_SetAttributeViBoolean(vi. The Winsock control acts much like the MSComm object in Visual Basic. ‘ Select Buffer Elements: Readings. KE2700_ATTR_TEMP_UNIT. KE2700_VAL_ELEMENT_READING + KE2700_VAL_ELEMENT_CHAN) ‘ CheckError vi. When 100 triggers are multiplied by the sample count. When determining the appropriate trigger count and sample count values. KE2700_ VAL_TIMER. the number of readings in the buffer increases from 500 to 1000. KE2700_ConfigureTrigger(vi. the scan will execute 100 times and each time will take five samples. KE2700_ VAL_TEMP_FAHRENHEIT) CheckError vi. VI_TRUE) ‘ Enable Buffer as Next CheckError vi. In this example. 0#) CheckError vi. VI_NULL. KE2700_SetAttributeViReal64(vi. be aware that this doubles the amount of buffer space each reading occupies. 0. ‘ Configure for Fahrenheit CheckError vi. data(0). KE2700_VAL_ IMMEDIATE. KE2700_ATTR_BUF_AUTO_ CLR_ENABLED. retSize) Example using Winsock control This example will use the Winsock control included in Visual Basic to send SCPI commands directly to the Model 2701 using the TCP/IP protocol.com IVI Program The following is the init command to use when connecting to the Model 2701 with the IVI Driver. KE2700_ATTR_TIMER_INTERVAL. The pointer value is the maximum number of readings that are to be copied to the array. VI_NULL. 0. Notice the trigger count (100) and the sample count (5) values in the second line. pointer) ‘Enable the auto buffer Clear CheckError vi. VI_TRUE. VI_NULL. Must have the starting index in the array or program will bomb out CheckError vi.keithley. vi) The next step is to configure the instrument to make a temperature measurement in degrees Fahrenheit and set up the scan list. when storing the channel number with the readings. KE2700_SetAttributeViInt32(vi. Those numbers mean that when the scan is started. KE2700_VAL_CONTROL_NEXT) CheckError vi. KE2700_VAL_TEMP_TC_K.001) ‘ Configure buffer The following commands will start the scan when executed. pointer. This is useful if it’s desirable to read the buffer again and return only the readings acquired since the last time the buffer was read. VI_TRUE.1. The Model 2701 buffer can hold 450. Rather than polling the data as it comes back. KE2700_init(InstrumentName. 2) ‘ Get the buffer readings. one sample for every channel in the scan list. VI_NULL. 0. note that 0 is the starting position of the buffer from which readings are to be copied. be careful not to exceed the number of samples the buffer can hold. but it has added features like the data arrival event. KE2700_SetAttributeViInt32(vi. Channel# ‘ Get data from buffer CheckError vi. KE2700_Initiate(vi) The following buffer commands will copy the data stored in the internal buffer to the Array called Data. KE2700_ATTR_BUF_ELEMENTS. KE2700_ConfigureMultiPoint(KE2700_ ChannelList(vi. When using multiple Model 2701s in the same program. The new start position will then be pointer +1. VI_NULL. KE2700_VAL_ TEMPERATURE. KE2700_GetAttributeViInt32(vi. KE2700_ATTR_BUF_DATA_CONTROL.10::1394:: SOCKET” ‘Connect to the instrument ‘Open Session CheckError vi. it is common to poll the data as it arrives in order to detect the end of line character to identify the data transmission is complete. each completed scan represents 500 readings in the internal buffer. which fires when data is 7 . 5. InstrumentName = “TCPIP::192. 100. the Winsock control has the data arrival event. When using serial communications.

SendData “TEMP:TRAN TC. Use the connect method to establish a connection to the Model 2701.SendData “ROUT:SCAN:LSEL INT” & vbCr ‘ Enable scan . but do not actually start the scanning.SendData “UNIT:TEMP F” & vbCr ‘ Set for F Order is important.SendData “TRIG:SOUR TIM” & vbCr ‘ Set Trigger to timer SendData “TRIG:TIM 2.SendData “ROUT:SCAN (@101:105)” & vbCr ‘ Set scan list .(@101:105)” & vbCr ‘ Config for K thermocouple . there are multiple Winsock controls on the form and it’s necessary to connect each Winsock control to a unique instrument and IP address.10” ‘ IP address of 2701 .received from the Model 2701.SendData “INIT” & vbCr ‘ start scan The following command will request data from the Model 2701’s buffer.SendData “*RST” & vbCr ‘Reset 2701 SendData “TRAC:CLE” & vbCr ‘ Clear Buffer . With Win270101 RemoteHost = “192.(@101:105)” & vbCr ‘ Set up the channels for temp . The data sent is only the data that was not previously read from the last time the command was sent.CHAN.SendData “TRAC:FEED:CONT ALW” & vbCr ‘ set buffer to continuous filling mode . Look for comments in the code that explain about the SCPI command.(@101:105)” & vbCr ‘ Config for Thermocouple . but refer to the Model 2701 manual for detailed information on the syntax of the actual commands. beginning at location 0.SendData “TRAC:CLE:AUTO OFF” & vbCr ‘ Turn auto clear off. Win270101. The next time the command is sent. With Win270101 . a connection must be established with the instrument. The buffer is set for continuous filling mode.SendData “TRIG:COUN 100” & vbCr ‘ Set number of scans . the beginning location is n+1.SendData “TRAC:DATA?” & vbCr 8 ‘Get data from last reading . Anyone who has written a program with the MSComm object and SCPI commands should have no problems using the Winsock control. This example uses the Winsock control to communicate with the Model 2701 and sample five channels of temperature and display them on the Visual Basic form. Winsock Program Before sending any commands. must be done first .68. the first time this command is sent.SendData “FUNC ‘TEMP’. the readings will automatically begin to overwrite the buffer. The following code would be duplicated for a second Model 2701. the beginning data location is zero and the last location is the last stored reading(n).SendData “FORM:ELEM READ. When using multiple instruments.connect End With The following SCPI commands will configure the instrument for a scan of five temperature channels that are triggered by the internal timer. In other words. The following commands just configure the Model 2701.RNUM” & vbCr ‘ Set the element for reading and channel number .RemotePort = “1394” ‘ Port the 2701 uses for connection . This means that after the buffer is filled.1. and the last location is the current last stored reading. Buffer size default 450000 .SendData “SAMP:COUN 5” & vbCr ‘ Set number of channels .SendData “TEMP:TC:TYPE K. only the IP address would be changed to match the setting of the second instrument.0” & vbCr ‘ Set Timer Time in sec End With This command will start the scan: Win270101.

the data will be returned in the DataArrival event of the Winsock control. Once this system is complete. the chamber is in a different building than the monitoring station. It would even be possible to use anoth- er Integra Series product that supports GPIB. but that can be easily changed to the RS-232 platform. Both drivers will be able to scan and store the reading to the internal buffer at the same speed. Let’s examine a couple of applications that will illustrate each type of programming. look for the addition of a line feed to the end of the returned data. depending on the amount of data being returned. some of which now use RS-232 and some of which are GPIB. Refer to the Visual Basic Program for an example of how this is done.GetData strdata The command to stop the scan is: Win270101. This will also play a role in the choice of a driver. the Winsock control will allow faster updating through the Ethernet connection. Winsock Solution In these circumstances. given that the programmer already has a background with using SCPI and that the application will not benefit from the platform independent features of the IVI driver. Before attempting to connect the Model 2701 to a corporate network. IVI Solution The IVI driver will be communication platform independent. The system will be duplicated in another plant and will also use Ethernet as a communication method. To determine when all the data has been sent. The chamber in this particular plant is in a different building than the monitoring station. Dim strdata As String Win270101. The IVI driver simplifies the buffer management tasks involved in extracting that data and loading it into an array. Win270101.com. They can be downloaded from Keithley’s website at http://www. The Winsock control would also be able to send the reading back to the monitoring computer faster. keithley. The 2701 data is returned as a comma delimited string.SendData “INIT:CONT OFF” & vbCr Disable Continuous initiation When exiting the program. Be aware that. all the data may not come back all at once. A Final Note Keithley has developed two Visual Basic example programs to illustrate the principles in this document. The DataArrival event may execute several times for a single TRAC:DATA command. Many variables must go into that decision—it’s ultimately up to the programmer to decide which method is more appropriate. there would be no need to learn the new IVI driver. At these other locations. so Ethernet communication would be perfect for this application. Next. always contact the network administrator for the settings required. Refer to the next section for further details. it’s important to take into account the different speed requirements of the application. the Winsock control would be the best way to program the Model 2701. Application Problem #2 A programmer is assigned the task of writing a program that will monitor ten channels of temperature inside a temperature chamber. but these changes are very small compared to the effort involved in re-writing the entire program. an error may occur when trying to open the connection the next time.When the TRAC:DATA command is sent. Using the Winsock control would be very similar to using the MSComm object. 9 . use the following code to put the data into a variable. Given that the programmer already knows how to use SCPI commands. there is no corporate network. so Ethernet communication would be perfect for this application. it will replace existing systems at different manufacturing plants.Close Example program summary There are no set rules that dictate when to use the IVI driver and when to use the Winsock control. The instrument name would be the ResourceDesc in the Keithley configuration panel. it’s important to close the connection to the Model 2701. As in Application Problem #1. other minor changes can be expected. Refer to the IVI help file for more information on IVI commands and to the manual for more information on SCPI commands. If the connection is not closed. That makes it possible to write a program now for the Step using the Ethernet connection. If the concern about speed is related to the speed at which the program triggers the scan and then sends that information directly to the computer. This error may make it necessary to cycle the power of the instrument to close the connection. To minimize downtime. When switching between platforms and instruments. The application requires a temperature update to the monitoring computer once every five seconds. Application Problem #1 A programmer is assigned the task of writing a program that will monitor forty different temperature channels inside a manufacturing plant’s temperature chamber at a scan rate of once a minute. generally by just modifying one line in the program. The programmer already has a background in GPIB and RS-232 communication methods and has already programmed several different instruments using SCPI commands. All that’s required is to change the instrument name when invoking the init command to the RS-232. the new system installation must be completed as quickly as possible. Speed considerations When choosing a driver.

and click TCP/IP. then Control Panel. Click on the Windows Start button. 4. the procedures described here may differ slightly on computers made by different companies. The Default Gateway and the DNS settings could be needed when connecting to a corporate network. select Microsoft. then select TCP/IP and follow on-screen directions. 6. On the IP Address tab. In each version of the Windows operating systems. If configuring a computer with two network cards. click Add.) 1. select the proper adaptor (NIC). This is done by clicking the Add button. click on Properties. after the TCP/IP notation. It’s possible to tell the difference by the listing.APPENDIX A Configuring a Network Interface Card (NIC) Card To configure a network interface card. Figure 7 (Refer to the network configuration window shown in Figure 7. click on Specify An IP Address. Follow the instructions on the screen and reboot as necessary. one must be added. Select on the Protocols Tab. 2. this is done differently. After TCP/IP protocol installation. Look for a TCP/IP entry. select the method of obtaining the IP address. After selecting the TCP/IP protocol. 3. 4. the TCP/IP protocol must also be installed and configured. then select the method of obtaining the IP address. there will be a reference to the NIC card(s). 3. Open the folder named Network. For an isolated network. there should be two entries. 8. Configuration in Windows 95/98/ME 5. Also. 7. Select Settings. If there is no entry for TCP/IP. . these settings are not used. 10 8. 5. then Control Panel. For an isolated network. Then click on Protocol. these settings are not used. If there is no TCP/IP protocol listed. 6. click on Specify An IP Address. Configuration in Windows NT4 1. The Default Gateway and the DNS settings could be needed when connecting to a corporate network. On the IP Address tab. Follow the instructions on the screen and reboot as necessary. For an isolated network. Open the folder named Network. Complete the IP Address and Subnet Mask according to the network configuration. 9. 2. Select Settings. click the Properties button. 7. Complete the IP Address and Subnet Mask according to the network configuration. Click on the Windows Start button. For an isolated network. one for each card.

the TCP/IP protocol should be listed and selected. 2. 6. then select Protocol. Under “or pick a control panel icon”. 7. click on Install.Configuration in Windows 2000 Configuration in Windows XP Figure 8 (Refer to the network configuration window shown in Figure 8. Go back to the General tab window. select the TCP/IP protocol and click on Properties. then Control Panel. these settings are not used. For an isolated network. Follow the instructions on the screen and reboot as necessary. Select Settings. Click on Network and select Dial-Up Connections. Click on the Windows Start button. and click Add. 8. Follow the instructions on the screen and reboot as necessary. 10. 9. 3.) 1. In the General tab window.) 1. 8. Go back to the General tab window. Right Click on “Local area connection” and select Properties 5. Select Use the Following IP Address. 9. If not. Right click on Local area Connection. The Default Gateway and the DNS settings could be needed when connecting to a corporate network. Click on the Windows Start button. Select the TCP/IP protocol. If not. and click Add. click on Install. Select Network and click Internet Connections 3. In the General tab window. 7. then click Install. 2. 6. then select Properties. select Network Connections 4. 10. select the TCP/IP protocol and click on Properties. 5. For an isolated network. these settings are not used. Select the TCP/IP protocol. then select Protocol. 4. the TCP/IP protocol should be listed and selected. Figure 9 (Refer to the network configuration window shown in Figure 9. then click Install. 11 . The Default Gateway and the DNS settings could be needed when connecting to a corporate network. then enter the IP address and subnet mask for the network. Select Use the Following IP Address. then enter the IP address and subnet mask for the network.

IS/IT: Short for Information Services or Information Technology. Management Information Services is an older term for the same subject. Inc. Router: A device that forwards data packets from one network to another. TCP/IP: Transmission Control Protocol/Internet Protocol. Computer departments inside companies are commonly referred to as IS departments. The host transmits its address with each packet of data. and the Model 2701. 28775 Aurora Road • Cleveland. Ethernet address. It may also be referred to as a hardware address. like an IP address. Default Gateway: The IP address of the computer that is attached to the network running TCP/IP that knows how to route data to other networks. NIC: A network interface card is an electronic board installed in a computer so the computer can communicate with a network. If the packet is too large to be transmitted by the data link layer. Ethernet is the most widely used form for a LAN communication and is the IEEE standard 802.keithley. Maximum cable length is 100m. allowing them to communicate.3.APPENDIX B Glossary API (Application Programming Interface): A set of callable software functions that applications use to make requests to the operating systems. Peer-to-Peer Network: A type of network in which no two computers have more control over the network than another. Repeater: A device that amplifies incoming transmission signals before regenerating them on its output.com No. A systems administrator may require a host’s MAC Address when it is connected to a corporate network.S.A. to represent the MAC address. Each can act as both a server and a client. 2393 602600DCI . Packet: A chunk of information that contains both the original data to be transmitted along with additional addressing information. the network layer breaks into multiple pieces. as computers are the main tools used in information management. servers. Hub: A passive hub is a device that split the received signals among other connected nodes. Ethernet: A network standard that uses either coaxial or twisted pair cable. IP Address: A unique 32-bit address assigned to each host attached to the network. An IP address specifies both the network and the host address. node ID. Network: Two or more computers connected together. It can also act as a translator between two different network protocols. The Model 2701 uses a decimal number. Printed in the U. Bridge: A device that passes network data between two segments of a network. MAC Address: The Media Access Control Address is a host’s unique identity. Subnet Mask: A 32-bit binary number expressed as four three-digit segments. This means that each can supply resources to the other peer computer. This will maintain signal integrity along a longer media run than is normally possible. or adapter address. Protocol: A formal set of communication conventions used by two network nodes to communicate properly with each other. The Subnet Mask is used in conjunction with an IP address to determine the network number and host number of the IP address. transmits them. much like an IP address structure. that can be represented in HEX or decimal. It has become the standard protocol used when configuring networks. An active hub amplifies or repeats incoming signals before distributing them. © Copyright 2002 Keithley Instruments. This would include workstations. It is a six byte hexadecimal number Keithley Instruments. then reassembles the packet at the receiving end. 10BaseT/100BaseTX: Unshielded twisted pair running at 10/100 Mbps. INterNIC Internet Network Information Center: The organization responsible for assigning Internet network addresses and domain names to hosts that are connected to the Internet. Gateway: A computer that acts as a translator on the network or as a router between two network technologies. This is not required when using an isolated network. Ohio 44139 • 440-248-0400 • Fax: 440-248-6168 1-888-KEITHLEY (534-8453) www. The firewall filters packets by examining them on one side and deciding what to pass along to the other side. Dynamic Host Configuration Protocol (DHCP): A feature of Windows NT servers that automatically assigns IP addresses to hosts on a TCP/IP network whenever the hosts start up. The MAC address is usually assigned to the host at the factory. A set of network protocols and associated tools that originated in the UNIX and Internet environments. Host: Defined as anything on the network that can transmit and receive IP packets on a network. Inc. which encompass all aspects of managing information. Firewall: A hardware or software component in the data path between the internet and an internal network. 100BaseT is often referred to as 100BaseT fast Ethernet.