For more than two decades, there have been two predominant buses for instrument control – the RS232 serial bus, primarily used to control scientific and analytical instrumentation, and the IEEE 488 GPIB, primarily used to control traditional test and measurement equipment.
While RS232 ports have been readily available on both desktop and notebook computers worldwide, controlling instruments through GPIB requires the use of special controller hardware. When considering choices for instrument control hardware, many scientists and engineers often make the choice solely based on price, incorrectly assuming that GPIB interfaces are a commodity and that all controllers are equal.
In this white paper, three key differentiators for GPIB controller hardware are examined and the hardware and software features that can make significant improvements in all areas of your test and measurement systems, from more productive and efficient application development, to faster and more reliable application execution, to worry-free debugging and maintenance, are explained.
When purchasing a GPIB controller for your instrument control system, please remember that in three key areas National Instruments GPIB Controllers offer benefits that can help save you time and money throughout the life of your system, from development through production and maintenance. These three areas are:
For the remainder of this white paper, we focus on these three critical areas for GPIB controller hardware and analyze specific features of National Instruments GPIB hardware and software that give you clear advantages in each of them. In addition, we provide a comparison to other non-NI GPIB hardware products and examine the benefits of an NI solution, both in time and money.
Before proceeding, it is very important to note that although each of these three areas is discussed separately, it is not possible to completely divide them. For example, in order for a driver to provide high reliability and robustness, it may incur additional internal overhead which could negatively affect performance. Having the best GPIB software and hardware combination is having a delicate balance of features that provides the optimum in performance, reliability, and productivity.
When judging the overall performance of GPIB hardware, the most obvious specification is the rated throughput of the board. For example, does the board have a maximum throughput of 700 kB/s, 1.5 MB/s or 8 MB/s? However, in addition to that rating, there are several other important factors to look at that are now explored in more detail. These factors can be combined into two areas: 1) hardware speed, and 2) driver speed.
The maximum throughput rating on a board is very important because it indicates the fastest throughput at which the board can transfer data over the GPIB. The faster the transfer, the more data can be transferred over a shorter period of time. This can be very important in a production test environment where reducing product test time by a few milliseconds can result in significant cost savings. It is also important to look at how fast a GPIB board can transfer data under differing transfer sizes. For example, does the board perform as well using small data blocks and large data blocks? How consistent is the throughput response of the board over a range of data transfer block sizes? Figure 1 shows the performance of the NI PCI-GPIB for various data block sizes.
As you can see from the chart, the maximum NI PCI-GPIB transfer rate is more than 1.5 MB/s and reaches a transfer rate of greater than 1 MB/s for a transfer block size of 500 B, a fairly common transfer size. In addition, even at transfer block sizes of less than 500 B, the board still performs very well.
NI achieves this increase in performance by relying on custom designed GPIB ASICs. All NI hardware designed since 1997, has used an NI TNT GPIB ASIC. In addition to the custom NAT4882 circuitry required to perform IEEE 488.2 controller/talker/listener functions, the NI TNT ASICs incorporate the Turbo488 performance enhancing core as well as the required GPIB transceivers. In addition, the NI TNT ASICs include an onboard FIFO and are capable of DMA transfers, which save CPU time because the PC can focus on other tasks while a GPIB transfer is in progress.
In contrast, many other GPIB suppliers use GPIB functionality in FPGA. However, the FPGAs do not incorporate any of the performance-enhancing features available in the NI TNT ASICs. In addition, many low-cost boards offer poor hardware speed because they are not DMA capable and do not include onboard FIFOs.
The NI TNT ASICs also provide additional features that improve performance. The NI TNT ASICs provide exact adherence to the IEEE 488.1 T1 delay times, ensuring that no data is lost by instruments and that transfers happen as efficiently as possible. In addition, the NI TNT ASICs provide incredibly fast response times to handshaking signals. Finally, the NI TNT ASICs offer the high-speed handshaking protocol, HS488, defined by IEEE Standard 488.1-2003. The HS488 protocol defines data throughput rates up to 8 MB/s. Users can take advantage of HS488 if they connect their NI GPIB controller to a HS488-capable instrument.
A comparison of the hardware performance of the NI PCI-GPIB to other providers’ PCI-based GPIB controllers shows a clear NI advantage. In addition to the manufacturers rated performance, a test was set up in which a unit under test that was loaded with a programmable electronic load and its response was read by an oscilloscope. These instruments were controlled by a very simple software application. The application was flexible and could send and receive data to and from the instruments in small blocks, large blocks, and a mixture of both. Comparing the performance of the NI GPIB hardware versus the lower-cost GPIB boards showed that depending on the board being used, a 5 to 30 percent performance improvement could be achieved. This is a significant advantage. For example, over a 10-hour shift, with a 20 s test time per device, a 5 to 30 percent performance improvement translates to 110 to 820 additional devices tested. Over a 5-day work week, that advantage translates to 570 to 4120 additional devices tested.
Although the hardware speed may be the most important factor in determining the overall performance of a GPIB board, driver speed is another crucial aspect of the overall execution of a board. How well the driver architecture is designed determines how efficient it is in handling various types of GPIB calls, including GPIB data transfers as well as GPIB bus management calls and error handling.
One important task the driver handles is serial polling. The GPIB standard requires the controller to be capable of performing a serial poll, where it polls every device on the GPIB bus and determines which device has requested service. An application must dedicate a certain amount of execution time to serial polling to determine which devices on the bus require service. The NI-488.2 driver implements this in a very efficient manner, and in addition, provides an autopolling mechanism whereby the driver conducts the serial polls in the background, taking advantage of application and processor idle time. Not only does autopolling more efficiently use PC resources, but by performing an autopoll the driver is capable of detecting and responding to a service request much faster than it would otherwise.
In addition to polling, it is important that a driver be capable of synchronous as well as asynchronous transfers. By having the ability to transfer data asynchronously, the instrument control application can devote PC processor time to other tasks. For example, an application can have two simultaneous loops, one responsible for the GPIB transfers and one that can perform other analysis or user interface tasks.
Finally, because the NI GPIB driver API is the de facto industry standard, lower-cost GPIB providers typically supply a driver that uses a wrapper around their driver that responds to calls to the NI driver. Because these driver developers do not know the internal architecture and intricacies of the NI driver, they are not able to optimize the performance of their driver. The result is poor performance of these wrapped drivers. In addition, driver developers rarely provide a wrapper for every function in the NI driver, which leaves some applications with unavailable functions.
The second important factor in choosing a GPIB solution is reliability, which is not limited to hardware reliability only but extends to software reliability as well as vendor reliability.
Using highly reliable hardware is crucial because it typically translates directly to cost savings. If the hardware is reliable and works without problems, you can avoid the cost of downtime as well as the cost of changing hardware and revalidating your systems. NI goes to great lengths to ensure that our GPIB hardware is extremely reliable. Some of the things that help ensure this are:
Having reliable software ensures minimal downtime as well as a wider variety of systems on which to develop and deploy GPIB applications. NI-488.2 driver software is full-featured and has evolved over many man-years of development. For example, with NI-488.2 you can develop multithreaded applications as well as those written to run on multiprocessor or hyperthreaded systems. The driver has been thoroughly tested on those types of systems to ensure reliable, uninterrupted use.
Finally, your GPIB vendor can play a major role in the overall reliability of your application. National Instruments has been manufacturing GPIB products for more than 30 years. We have great expertise in making these products and a long track record in supporting older interfaces and providing the same compatible API for those 20 years. NI is also ISO 9001:2000 certified, showing that our internal processes meet industry standards and further ensure the quality and reliability of our products.
In addition to performance and reliability, a very important factor to examine is productivity. Productivity can be maximized both at development time as well as in system and application maintenance. Productivity can be achieved by using a full-featured, highly usable, and architecturally stable driver.
An instrument driver is a set of software routines that control a programmable instrument. Instrument drivers greatly simplify instrument control and reduce test program development time by eliminating the need to learn the programming commands for each instrument. National Instruments provides drivers for more than 6,500 instruments and 300 different vendors. These instrument drivers are written for LabVIEW, LabWindow/CVI and/or Microsoft Visual Studio. Because these drivers have already been created for you and are available as free downloads, your productivity will not be hindered during set-up and you will be able to get started much quicker with your application.
The National Instruments GPIB driver, NI-488.2, provides countless features that increase development productivity and improve driver usability. Many of these features are unique to NI-488.2 and not available with any of the lower-cost GPIB products available on the market.
You can use the NI-488.2 Communicator to verify that you can establish simple communication with your GPIB instrument. This is an interactive utility that allows you to write commands to your instrument and read responses back from your instrument. It provides detailed information about the status of the NI-488.2 calls and you can use it to print sample C source code that performs a simple query to a GPIB instrument.
Figure 2: NI-488.2 Communicator Quickly Verifies Hardware Connection
Interactive Control or ibic is available for more advanced, yet very quick, interactive communication with your GPIB instruments. It allows you to interactively enter and execute GPIB functions or routines without using a development application or programming language. By successfully communicating with your GPIB instrument using the Interactive Control utility, you can quickly confirm that your hardware is fully capable of integration with your programming environment.
Figure 3: IBIC Allows for More Advanced GPIB Communication
Using NI I/O Trace, the user can “trace” driver calls. This feature is extremely useful for application debugging. The NI I/O Trace records all device and board level calls with a time stamp. Developers can easily and efficiently detect errors and timing issues in their applications. This utility further differentiates National Instruments GPIB device functionality and usability above all others.
Figure 4: Example NI-I/O Trace Capture
With GPIB Analyzer, the you can analyze the physical bus activity by observing all of the GPIB handshake signals, interface management signals, and data signals. This capability is very useful for advanced debugging where NI I/O Trace alone cannot resolve the problems. In addition, you can analyze bus timing issues in much more detail. The GPIB Analyzer software is only available with NI GPIB Analyzer boards (PCI-GPIB+). No other GPIB supplier provides similar functionality.
Figure 5: GPIB Analyzer Active Capture Using PCI-GPIB+
Integration with NI Products - NI-488.2 integrates very well with other NI products including LabVIEW, LabWindows/CVI, Measurement Studio for Microsoft Visual Studio, and Measurement & Automation Explorer (MAX). Although some other GPIB vendors provide driver wrappers for the NI-488.2 driver, these drivers are typically incomplete, work with LabVIEW only, and provide none of the configuration and debugging utilities available in MAX.
The NI-488.2 driver also provides unparalleled architectural stability, which also contributes to increased productivity. Because the driver and the driver architecture are very stable, there is no need for users to waste time rewriting and debugging applications when they want to upgrade them to a new interface or OS. Following are some of the specific features that contribute to architectural stability:
This paper provides an overview of the advantages that you obtain by using GPIB hardware and software from National Instruments. NI GPIB hardware and software products deliver improved performance, high reliability, and increased productivity. Performance is improved through state-of-the-art hardware and highly optimized software that maximize throughput. NI GPIB products deliver high reliability through stable hardware and software and more than 30 years as a leading GPIB vendor. You can increase your productivity by using easy and effective development and debugging tools, and a stable software architecture.
NI GPIB products deliver these benefits so you can design, develop, and test your products faster and more efficiently. Even a small incremental advantage that results from these benefits can, over time, result in very large savings in both time and money.
1 Korean, simplified Chinese, and traditional Chinese localization available in NI-488.2 for Windows 2000/XP version 2.3 and higher. Japanese localization is currently available.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
The mark LabWindows is used under a license from Microsoft Corporation. Windows is a registered trademark of Microsoft Corporation in the United States and other countries.