Using HS488 to Improve GPIB System Performance

Publish Date: Mar 30, 2009 | 13 Ratings | 3.23 out of 5 | Print


This document introduces the HS488 protocol and explains how you can use it to improve your GPIB system performance.

Table of Contents

  1. Introduction to HS488
  2. Upgrading Your GPIB System to Use HS488
  3. Configuring Your System to Use HS488
  4. Flexible System Configurations
  5. Related Links

1. Introduction to HS488

Innovations in technology continue to improve the computers and the instrumentation that we use to implement GPIB-based test and measurement applications. Faster microprocessors and memory, PCI bus DMA, and advancements in digitizer technology contribute to reducing the time to capture and analyze large volumes of test data. As technology continues to evolve, the speed at which data can be transferred from the instrumentation to the host computer becomes important. Anticipating the need for a higher-speed data transfer mechanism for GPIB, National Instruments has created HS488, which delivers a standard method for increasing the maximum GPIB data transfer rate up to 8 Mbytes/s while maintaining compatibility with existing GPIB applications and instrumentation.

HS488, a higher-speed GPIB transfer protocol, scales the maximum data transfer rate of ANSI/IEEE Standard 488.1-1987 up to 8 Mbytes/s by removing delays in the 3-wire IEEE 488.1 handshake. HS488 is implemented in hardware as a feature of the TNT4882C GPIB controller ASIC, and thus imposes no additional software overhead during HS488 transfers. Because HS488 is implemented at the hardware level, your application code requires no modification to take advantage of high-speed GPIB. Using the HS488 protocol, the GPIB Controller hardware can automatically detect compatible devices capable of using the HS488 handshake to transfer data. If the Controller does not detect an HS488 capable device, it automatically defaults to the standard IEEE 488.1 3-wire handshake to complete the data transfer. The HS488 protocol employs the same proven, high-speed, data streaming techniques used in VME, PCI, and Fast SCSI.

To ensure compatibility with existing GPIB devices, the HS488 protocol has been developed as a superset of the IEEE 488 standard; thus, you can mix IEEE 488.1, IEEE 488.2, and HS488 devices in the same system and continue using existing cables and cabling configurations. HS488 enhances the IEEE 488 standard, a foundation technology for test and measurement applications, by delivering additional performance and headroom to developers who want faster data transfers across GPIB.

Back to Top

2. Upgrading Your GPIB System to Use HS488

By purchasing an HS488-compatible GPIB controller today you ensure that you can take advantage of HS488 devices now and in the future. For compatibility with existing GPIB instrumentation, HS488 devices coexist with non-HS488 devices without any special considerations or system configurations. To use the HS488 handshake protocol for transferring data, both the GPIB controller and the GPIB interface inside your device must be compatible with HS488. You must also verify that your system has no more than 15 m of cable; HS488 operates with cable lengths of 1 to 15 m with one or more devices per meter of cable. Once these conditions have been verified, enabling your system to take advantage of HS488 performance is very easy. Simply specify the appropriate HS488 cable length programmatically or by using the GPIB Configuration software utility. Both configuration methods will be illustrated in a later section of this application note.

GPIB Controllers Capable of HS488
GPIB interfaces that use the TNT4882C Talker/Listener/Controller chip or any other GPIB interface chip that implements the HS488 handshake can transfer data using HS488. HS488-capable GPIB controllers include the PCI-GPIB, AT-GPIB/TNT, and AT-GPIB/TNT (Plug and Play), among others.

GPIB Devices Capable of HS488
HS488 is an open standard that can be used by all designers of GPIB devices. Any device that uses the TNT4882 Talker/Listener chip or any other GPIB interface chip that implements the HS488 protocol is capable of transferring data using HS488. Contact your instrument vendors for higher performance, HS488-compliant instruments.

Back to Top

3. Configuring Your System to Use HS488

Selecting Your HS488 Cable Length
When configuring your system to use the HS488 high-speed protocol to communicate with HS488-compliant devices, you must specify the total number of meters of GPIB cable in your system. The total GPIB cable length is used to automatically calculate the appropriate bus timings. The controller, when it initializes the GPIB, must send the cable length information to all HS488 devices so high-speed transfers occur without errors.

Bus Timing Considerations
You should also consider setting the bus timing (T1 delay) for your system to 350 ns. If your system consists of both HS488 and non-HS488 devices, transfers to the non-HS488 devices will use the IEEE 488.1 3-wire handshake. For 3-wire data transfers, the system uses the T1 delay value you specify either programmatically or through the GPIB Configuration software utility. The T1 delay affects the data transfer rates when using the 3-wire handshake.

The default value for the bus timing parameter is 500 ns, which works for any system. However, when using HS488, the total length of the GPIB cable in the system is less than or equal to 15 m and so the 350 ns value is appropriate to obtain higher performance using the 3-wire handshake. Refer to ANSI/IEEE Standard 488.1- 1987, Section 5.2, for more information about the factors that might affect the choice of the T1 delay.

System Configuration Effects on HS488
The HS488 protocol increases maximum transfer rates for GPIB reads and writes up to 8 Mbytes/s, depending on your system configuration. Maximum data transfer rates can be limited by your host computer and GPIB system setup. For PC-compatible computers with PCI bus, the maximum transfer rate obtainable is 8 Mbytes/s. For PC-compatible computers with an ISA bus it is 2 Mbytes/s. The same IEEE 488 cabling constraints for a 350 ns T1 delay apply to HS488. As you increase the amount of cable in your GPIB configuration, the maximum data transfer rate using HS488 decreases. For example, two HS488 devices connected by 2 m of cable can transfer data faster than four HS488 devices connected by 4 m of cable. Figure 1 illustrates that with HS488, you can always realize significant performance improvement over the 1 Mbytes/s, IEEE 488.1 3-wire handshake regardless of your cable length.

HS488 performance remains high even when using longer cables
Figure 1. HS488 Performance Improvement Over IEEE 488.1 3-Wire Transfers

If you specify an HS488 cable length that is much smaller than what you actually use, the transferred data could become corrupted. If you specify a cable length longer than you actually use, the data is transferred successfully, but more slowly than if you specified the correct cable length.

HS488 Configuration Messages
The Controller-In-Charge sends out the HS488 command bytes (interface messages) to enable HS488 on all HS488 capable devices. These messages are sent only once to configure the system for HS488. The HS488 configuration message is made up of two GPIB command bytes. The first byte, the Configure Enable (CFE) message (hex 1F), places all HS488 devices into their configuration mode. Non-HS488 devices ignore this message. The second byte is a GPIB secondary command that indicates the number of meters of cable in your system. It is called the Configure (CFGn) message. Because HS488 can operate only with cable lengths of 1 to 15 m, only CFGn values of 1 through 15 (hex 61 through 6F) are valid. If the cable length was configured properly in the GPIB Configuration Utility, you can determine how many meters of cable are in your system by calling ibask (option IbaHSCableLength) in your application program. For CFE and CFGn messages, refer to Appendix A, Multiline Interface Messages, in the NI-488.2M Function Reference Manual for Win32.

Enabling HS488 Using the GPIB Configuration Software Utility
For new or existing systems with fixed configurations, you can easily configure your system for HS488 by simply selecting the appropriate total cable length (in meters) in the GPIB Configuration software utility. Because HS488 configuration is done automatically by the NI-488.2 software, you can use existing executables without having to modify and recompile your source code. Figure 2 shows an example of how to enable your system for HS488 and where to specify the bus timing (T1 delay) using the GPIB Configuration software utility located in the Windows Device Manager.

Use Windows Device Manager to enable your system for HS488
Figure 2. Enabling HS488 under Windows 95

When you enable HS488 using the configuration utility, the NI-488.2 software automatically sends out the HS488 configuration messages when you use the device-level function, ibdev, to bring a device online. If you call ibconfig to change the GPIB cable length, the NI-488.2 software sends out the HS488 message again the next time you call a device-level function. If you use board-level functions, you must use ibcmd or SendCmds to send the HS488 configuration message to the devices.

Using the GPIB Configuration software utility for configuring your system for HS488 offers many advantages when you are deploying a number of test systems using the same application software. With the configuration utility, your applications are not tied to a unique testing configuration. You can add or remove devices from your test system without having to modify and recompile your application software. You simply change the specified HS488 cable length. Your application software also remains completely portable giving you the freedom to enable or disable HS488 based on your system needs. Because of this, you can reuse your software with a number of different test system configurations.

Enabling HS488 Programmatically Using Device-Level Calls
To enable HS488 for your GPIB board, use the ibconfig function (option IbcHSCableLength). The value passed to ibconfig should specify the number of meters of cable in your GPIB configuration. For example, for a system with a total of 4 m of cable you would place the following calls at the beginning of your program:

brd0 = ibfind(“GPIB0”);/*Find GPIB board 0*/
ibconfig (brd0, IbcHSCableLength, 4);/*Configure controller for HS488*/

Again, to configure the system for HS488, the Controller-In-Charge must send the HS488 configuration messages to configure other devices for HS488 transfers. For device-level calls, the NI-488.2 software automatically sends the HS488 configuration message to devices.

Enabling HS488 Programmatically Using Board-Level Calls
If you are using board-level functions or NI-488.2 routines and you want to configure devices for high-speed, you must send the HS488 configuration messages using ibcmd or SendCmds. Using the same example as above, you would place the following code at the beginning of your program:

brd0 = ibfind(“GPIB0”);/*Find GPIB board 0*/
ibconfig (brd0, IbcHSCableLength, 4);/*Configure controller for HS488*/
ibcmd (brd0, “\x1F\x64”, 2);/*Send HS488 Config. Mssges*/


brd0 = ibfind(“GPIB0”);/*Find GPIB board 0*/
ibconfig (brd0, IbcHSCableLength, 4);/*Configure controller for HS488*/
SendCmds (0, void “\x1F\x64”, 2);/*Send HS488 Config. Mssges*/

Back to Top

4. Flexible System Configurations

All HS488 Devices in the System
Regardless of whether you use the industry-standard NI-488 GPIB I/O functions (ibwrt, ibrd, etc.) or the NI-488.2 Multiple Device I/O routines (SendList, SendDataBytes, etc.) where multiple devices can be addressed to Listen (receive data), all data transfers will use the HS488 handshake protocol. Taking into account cable lengths between the HS488 devices and the system controller, overall system performance will still be dictated by the slowest HS488 device on the bus.

All data transfers connected to the PC use the HS488 protocol
Figure 3. Diagram of System with All HS488 Devices

Mixing HS488 and Non-HS488 Devices
When multiple devices are addressed to Listen on the bus, if all Listeners are not HS488 devices, the system controller will transfer data using the IEEE 488.1 three-wire handshake. Transfers to strictly HS488 devices will automatically use the HS488 handshake. Overall system performance will be dictated by the slowest device on the bus.

The HS488 device will transfer data using the IEEE 488.1 handshake
Figure 4. Diagram of System with Mixed Devices

HS488 Standardization Efforts
Multivendor compatibility has been the hallmark of the IEEE 488 standard. Accordingly, HS488 is undergoing formal IEEE standardization to preserve compatibility and ensure that everyone in the industry can take advantage of the benefits of HS488. The IEEE is nearing formal approval of a high-speed enhancement to the IEEE 488 standard. The IEEE high-speed GPIB committee, which has more than 30 members, includes leading suppliers such as Capital Equipment Corporation (CEC), IOtech, Hewlett-Packard, Ines, National Instruments, and Tektronix.  HS488 was accepted as an addition to the IEEE 488.1 standard in 2003.

Developing HS488 Compatible Devices
For instrument designers who wish to upgrade their designs to use high-speed GPIB, we offer the TNT5002 Talker/Listener GPIB interface chip.  This RoHS-compliant device contains complete NI TNT4882 and NI NAT9914 register sets. Therefore, if you are using either of these ASICs, you can port existing code directly to the TNT5002, significantly reducing software development time. In addition to integrating the circuitry of the TNT4882, the TNT5002 also incorporates a 3.3 V PCI core, making it ideal for use in all IEEE 488 instrument designs that incorporate the PCI bus.  Refer to the TNT5002 Technical Reference Manual for more information.

Back to Top

5. Related Links

Products and Services: Instrument Control

Developer Zone Tutorial: The HS488 Protocol

Back to Top

Bookmark & Share


Rate this document

Answered Your Question?
Yes No