Developing Distributed GPIB Test Systems Using NI Ethernet-to-GPIB Controllers

Updated Dec 7, 2023

Environment

Hardware

  • GPIB-ENET/1000

Driver

  • NI-488.2

This article serves as a general introduction for implementing distributed test applications using the NI GPIB-ENET/1000 TCP/IP Ethernet-to-GPIB controller. It offers three example applications in source code to help you get started developing your own distributed test applications. The GPIB-ENET/100 , predecessor to the GPIB-ENET/1000, may also be used in distributed applications, however, the configuration process is slightly different.

Introduction

The GPIB-ENET/1000 TCP/IP Ethernet-to-GPIB controller expands the scope of computer-controlled test applications through the use of Gigabit, 100BaseTX, and 10BaseT networks. Assembling the components of your test application through a network addresses factors such as size, distance, environmental conditions, integration of test systems, and instrumentation located in different areas of your company, as well as the sharing of instrumentation resources.

Computer networks are standard mechanisms for sharing resources, exchanging information, or archiving data for later use. Using these networks, you can expand the functionality of your distributed test systems to serve a variety of needs, including timely dissemination of critical test information. By using a server application that manages remote access to your test system, you can provide key decision makers, operators, technicians, and developers easy access for maintenance, development, control, and monitoring. Distributed test and measurement applications continue to grow in popularity as the applicable networking technology continues to decrease in cost and evolve as a standard component in every corporate computing environment.
 

Using the GPIB-ENET/1000 for Instrument Control

The GPIB-ENET/1000 and NI-488.2™ software convert a computer equipped with an Ethernet port into a GPIB Talker/Listener/Controller. The GPIB-ENET/1000 delivers the same GPIB controller capability as a plug-in board, but across an Ethernet link. NI-488.2 software performs all the necessary GPIB-to-Ethernet conversions to send information across the Ethernet link; the GPIB-ENET/1000 performs all necessary Ethernet-to-GPIB conversions to communicate to your GPIB instruments. The GPIB-ENET/1000 offers a flexible, cost-effective solution for sharing instrumentation resources or creating expandable distributed test applications.


Figure 1. GPIB-ENET/1000 TCP/IP Ethernet-to-GPIB Controller
 

Applications

Applications for the GPIB-ENET/1000 include:

  • Controlling multiple racks of instrumentation from a single computer
  • Controlling instrumentation in a hazardous environment
  • Integrating two or more GPIB systems separated by distances greater than 4 m
  • Sharing access to GPIB instruments and systems so several users can download test data, or conduct tests from several computer stations.
     

Cabling

The GPIB-ENET/1000 can be interfaced directly to twisted pair 10BaseT, 100BaseTX, or Gigabit (1000BaseT) networks. It automatically detects the type of network and runs at the highest available speed. It is also possible to connect the GPIB-ENET/1000 directly to the network port of a computer (without going through a network hub) by using a crossover cable instead of the standard twisted pair cable. In addition, you could also connect the GPIB-ENET/1000 to a different type of network by adding the appropriate converter to the setup. For example, for a 10Base2 or coax network, you need to connect a coax-to-twisted pair converter in between the GPIB-ENET/1000 and the network.
 

Performance

Typical sustained throughput of data is more than 1.4MBytes/s (IEEE 488.1) and 5.6Mbytes/s (HS488) – performance comparable to GPIB plug-in boards. Actual data rates may vary depending on your network configuration and the amount of network traffic.
 

Application Development Tools

You develop applications for the GPIB-ENET/1000 using the same NI-488 functions and NI-488.2-style functions you would use to program an AT-GPIB/TNT, PCI-GPIB, or USB-GPIB-HS interface. NI-488.2 frees you from writing low-level TCP/IP code to access the GPIB-ENET/1000. Furthermore, existing GPIB applications written with the NI-488.2 API can be used with the GPIB-ENET/1000 with little or no source code modification.

In addition, NI-488.2 includes installation and troubleshooting wizards, as well as complete debugging tools to help you get up and running as soon as possible with your application. NI LabVIEW and Measurement Studio application software products contain a fully integrated library of NI-488.2 functions for instrument control, as well as easy-to-use tools for data analysis, data formatting, data presentation, and data management. You can create your complete application, including the control of other type of instrumentation, from within one development environment. NI LabVIEW also features the Instrument Driver Finder (IDFinder), which allows you to search from our database of more than 8,500 free instrument drivers and install them on your machine without ever leaving the LabVIEW environment.
 

Remote Access Using the Internet

By combining our application development environments with NI-488.2, you can monitor and control your distributed GPIB test system. You can view front panels and control your complete instrumentation though the Internet. Figure 2 illustrates how our development environments can be used in conjunction with the GPIB-ENET/1000 to construct a distributed measurement system that can be accessed via remote computers running a simple Web browser. For more information on developing applications accessible via the Internet, contact NI and ask about the Internet capabilities of LabVIEW and Measurement Studio.
 



Figure 2. Remote Access Over the Internet
 

Configuring Your GPIB-ENET/1000

The GPIB-ENET/1000 hardware and NI-488.2 software must be correctly installed and configured before any GPIB applications can be developed. This section offers a roadmap for configuring a GPIB-ENET/1000 for operation. Refer to the GPIB-ENET/1000 Getting Started manual (shipped with the product) for platform specific installation instructions. In general, setting up a GPIB-ENET/1000 distributed test system is easy because the Ethernet network is already in place. All that remains is to add the GPIB-ENET/1000 as a device on the Ethernet:

  1. Install the appropriate version of NI-488.2 software on each computer that will be used to control a GPIB-ENET/1000.  NI-488.2 Version 2.8 supports the GPIB-ENET/1000 on Windows 7, Windows Vista, and Windows XP.
  2. Use the utilities included with the driver software to configure each individual GPIB-ENET/100 with a unique IP address (this step has to be performed only once per GPIB-ENET/100 interface and can be done manually or automatically).
  3. Configure the software on each controlling computer with the IP addresses of the GPIB-ENET/1000(s) (configured in Step 2 above) that it will control.

 

NI-488.2 for the GPIB-ENET/1000

Table 1 summarizes the operating systems under which you can use the GPIB-ENET/1000. The maximum number of GPIB-ENET/1000s is expandable under the Unix platforms. Contact NI if you need to control more than the specified number. The NI-488.2 API used to program your GPIB-ENET/1000 is consistent across these platforms as well as other interfaces, such as the PCIe-GPIB or USB-GPIB-HS. You can develop your software and use it with other interface types and other applicable operating systems with little or no source code modification.
 

Table 1. Maximum Number of GPIB-ENET/100 Interfaces

Operating SystemMaximum Number of GPIB-ENET/1000s
Controlled by a Particular Computer
Windows 7100
Windows Vsita100
Windows XP100
 

Assigning an IP Address to Your GPIB-ENET/1000

The primary task in configuring your GPIB-ENET/1000 is assigning it an IP address. The TCP/IP protocol requires that each device on the network be assigned a unique Internet address so that the devices can be located on the network. An invalid or improperly assigned IP address is the most common cause for problems when using the GPIB-ENET/1000.

There are two ways to assign an IP address. You can easily manually configure the IP address using the intuitive, password-protected Web interface provided with the GPIB-ENET/1000; or you can use the Dynamic Host Configuration Protocol (DHCP) provided by your network to automatically assign the GPIB-ENET/1000 an IP address. Contact your network administrator to verify that your network has DHCP available. By default, the GPIB-ENET/1000 will try to get an IP address using DHCP. If DHCP is available, you are ready to configure your unit and write your application. With DHCP, some servers also assign a name to the GPIB-ENET/1000. You can modify that name later and use it instead of the IP address, when referring to the GPIB-ENET/1000. If DHCP is not available, LEDs in the GPIB-ENET/1000 will so indicate and you will have to assign it a static IP address. Contact your network administrator to obtain a valid IP address for your network.

Be sure to follow the complete instructions outlined in the Getting Started manual for complete, correct installation.
 

Configuring NI-488.2 Software for GPIB-ENET/1000

After you have manually or automatically assigned an IP address to your GPIB-ENET/1000 and connected it to your network, any computer with a version of NI-488.2  that supports the GPIB-ENET/1000 can interface with the controller.

A single computer can be set up to control several GPIB-ENET/1000s for integrating multiple test systems into one application. You can also configure any number of computers to control a single GPIB-ENET/1000 for sharing access to instrumentation.

On each computer, you must configure NI-488.2 to associate a particular IP address with a particular interface name that corresponds to a GPIB-ENET/1000. Then, you can use that interface name in your programs to control the GPIB-ENET/1000 at that IP address. For example, assume you want to use Computer A to control two GPIB-ENET/1000s, one at IP address 130.164.15.01 and the other at 130.164.15.19. On Computer A, you would associate 130.164.15.01 with interface name GPIB0, and 130.164.15.19 with GPIB1. Your applications on Computer A would then use the interface name GPIB0 to control instruments attached to the GPIB-ENET/1000 at IP address 130.164.15.01 and GPIB1 to control instruments attached to the GPIB-ENET/1000 at IP address 130.164.15.19. Remember that you can refer to the GPIB-ENET/1000 by its assigned name instead of its IP address.

Suppose you also wanted to access the GPIB-ENET/1000 at 130.164.15.01 from Computer B. You would then associate GPIB0 on computer B with 130.164.15.01, and use GPIB0 in your applications on Computer B. There is no conflict in using the same interface name GPIB0 on Computer A and Computer B because these are completely separate host computers running different instances of NI-488.2. Application Example 3 provides details on how to write programs that cooperatively share a given GPIB-ENET/1000 among several computers.
 

Summary

The application examples detailed below are compact, and yet they represent all of the structures necessary to implement a large or small GPIB control system. The fact that Example 1 and Example 2 share virtually identical code shows how easily one networked computer can be programmed to control practically unlimited numbers of GPIB instruments. With minor adjustments, as shown in Example 3, many computers can share control of the same pool of GPIB instruments.

The GPIB-ENET/1000 TCP/IP Ethernet-to-GPIB controller and networked computers can place your GPIB test systems on-line so that your managers, test engineers, and technicians have quick and easy access to your GPIB instrumentation. Using server applications to manage each GPIB test system, you can selectively integrate different test stations into a single application or give key people remote access to the test system to view test data, perform maintenance-related tasks, or perform control and monitoring-related tasks that are necessary to fine tune, monitor, and maintain the productivity of the test system.

Application Example 1

Controlling Several Instruments from a Single Computer

Figure 3.  A Networked Computer Using a Single GPIB-ENET/1000 to Control a Remote Set of GPIB Instruments

For our first example, consider the situation detailed in Figure 3, in which we wish to control two GPIB devices in a manufacturing facility from a Windows 7 workstation in the corporate office. The devices are a multimeter at primary address 2 and an oscilloscope at primary address 21.
 

Application Example 2

Integrating Two or More GPIB Test Systems into a Single Application


Figure 4. A Networked Computer and GPIB-ENET/1000 Interfaces Control Scattered Sets of Instruments

For our second example, consider the situation detailed in Figure 4, in which we wish to control four GPIB devices, two in a laboratory at the corporate offices, and two in a remote manufacturing facility. They all will be controlled by a computer running Windows 7 in the corporate office. The devices are a multimeter at primary address 2, an oscilloscope at primary address 21, a function generator at address 5, and a network analyzer at address 2.

Application Example 3

Sharing Instrument Resources Between Several Users


Figure 5. Two Networked Computers Share a Single GPIB-ENET/1000

For our third example, consider the situation detailed in Figure 5, in which two workstations located in different facilities need access to the same set of GPIB instruments – an oscilloscope at primary address 21 and a multimeter at primary address 2. For this example, we tackle the case where a GPIB-ENET/1000 is controlled by two or more computers.

No special configuration is performed on the GPIB-ENET/1000 for more than one computer to use it. Any Windows computer with the GPIB-ENET/100 driver (NI-488.2 Version 2.8 or later) and a network connection can send commands to a particular GPIB-ENET/1000. If the GPIB-ENET/1000 is working on a command from one computer when a second command from another computer arrives, the second command is queued and executed after the first command is completed. With that procedure, commands may be delayed slightly, but the operation is otherwise transparent to several programs accessing the same GPIB-ENET/1000.

It is possible, however, for one computer to lock the GPIB-ENET/1000 or an instrument connected to the GPIB-ENET/1000 so that other computers cannot use it. This ability to lock the GPIB-ENET/1000 can be useful for security purposes and in preventing command or data crossover. For example, with no locking, if two computers use the same GPIB-ENET/1000 to gather data from the same instrument, Computer A may send a command to the instrument and before it can read back data, Computer B may send a different command to the instrument. This may cause the instrument to go into an error state, or Computer A may read back data from a different command query. With locking, Computer A first locks the interface, sends a command and reads back the data, and then unlocks the interface. During the time that Computer A has the interface locked, no other computer can access that GPIB-ENET/1000.

For this example, we will examine the case where two or more computers on the network access the same two instruments connected to one GPIB-ENET/1000. The example code below is the code used on each computer accessing the GPIB-ENET/1000. For our application example detailed in Figure 5, both computers will run the code below. This code assumes that we have configured the driver to associate the interface name GPIB0 with the IP address of a GPIB-ENET/1000 connected to two instruments. Another machine may try to access the same GPIB-ENET/1000 but will be locked out during the critical operations.

The example uses iblck, which is fully documented in the NI-488.2 Help you receive with your GPIB-ENET/1000 software.