Top Banner
GPIB General Purpose Interface Bus Yoshita Viraj(13) Yojitha C (28)
39
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

GPIB

GPIBGeneral Purpose Interface Bus

Yoshita Viraj(13)Yojitha C (28)

At one time, all electronic test equipment was built in individual boxes. When it came time to connect them to a computer, the natural choice was to use the computer's RS-232 port, but this proved inadequate for anything other than the simplest tasks.

Origin and NamingIn the late 1960s,Hewlett-Packard(HP) was manufacturing various automated test and measurement instruments, such as digitalmillimetersandlogic analyzers. They developed theHP Interface Bus (HP-IB)to enable easier interconnection between instruments and controllers (computers and other instruments)

It was later accepted as IEEE Standard 488-1975, and has evolved to ANSI/IEEE Standard488.1-1987. Today, the nameGeneralPurposeInterfaceBus (GPIB) is more widely used than HP-IB.Because the original IEEE 488 document contained no guidelines for a preferred syntax and format conventions, work continued on the specification to enhance system compatibility and configurability among test systems. This work resulted in a supplement standard, IEEE 488.2, Codes, Formats, Protocols, and Common Commands, for use with IEEE 488 (which was renamed IEEE 488.1). IEEE 488.2 does not replace IEEE 488.1. Many devices still conform only to IEEE 488.1. IEEE 488.2 builds on IEEE 488.1 by defining a minimum set of device interface capabilities, a common set of data codes and formats, a device message protocol, a generic set of commonly needed device commands, and a new status reporting model.The bus was relatively easy to implement using the technology at the time, using a simple parallelbusand several individual control lines. For example, the HP 59501 Power Supply Programmer and HP 59306A Relay Actuator were both relatively simple HP-IB peripherals implemented only inTTL, using no microprocessor.HP licensed the HP-IB patents for a nominal fee to other manufacturers. It became known as the General Purpose Interface Bus (GPIB), and became ade facto standard for automated and industrial instrument control. As GPIB became popular, it was formalized by variousstandards organizations.

What is GPIB ?

TheANSI/IEEE Standard 488.1-1987, also known asGeneral Purpose Interface Bus(GPIB), describes a standard interface for communication between instruments and controllers from various vendors, such as scanners and film recorders. TheGeneral Purpose Interface Bus(GPIB) is a system of hardware and software that allows you to control test equipment to make measurements quickly and accurately.

Timeline

Types of GPIB messages GPIB devices communicate with other GPIB devices by sending device-dependent messages and interface messages through the interface system. Device-dependentmessages, often calleddataor data messages, contain device-specific information, such as programming instructions, measurement results, machine status, and data files.Interfacemessages manage the bus. Usually calledcommandsor command messages, interface messages perform functions such as initializing the bus, addressing and un-addressing devices, and setting device modes for remote or local programming.

CHARACTERISTICSGPIB is a byte-serial, bit-parallel bus that uses a three-wire handshake and can connect up to 15 instruments (devices) to one computer (controller).

It uses a 24-conductor cable with up to two meters between devices, and 20 meters overall length in star,linear,or mixed topologies.

The maximum data rate is 1 Mbyte/s, although as cable length increases, this can decrease to 250 to 500 Kbytes/s. Usually, the devices on the bus set the overall data rate.

Basic GPIB Concept

The GPIB or IEEE 488 bus is a very flexible system, allowing data to flow between any of the instruments on the bus, at a speed suitable for the slowest active instrument.

There must also be no more than 2 m between two adjacent instruments on the bus.

It is possible to purchase GPIB cards to incorporate into computers that do not have the interface fitted.

As GPIB cards are relatively cheap, this makes the inclusion of a GPIB card into the system a very cost effect method of installing it.

GPIB/IEEE 488 CABLE

Devices have a unique address on the bus. Instruments are allocated addresses in the range 0 to 30, and no two instruments on the same bus should have the same address.

The addresses on the instruments can be changed and this may typically be done via the front panel, or by using switches often located on the rear panel.

Active extenders allow longer buses, with up to 31 devices theoretically possible.

In the original HPIB protocol, transfers utilize three wire handshaking system. Using this the maximum data rate achievable is around 1 Mbyte per second, but this is always governed by the speed of the slowest device.

A later enhancement often referred to as HS-488 relaxes the handshaking conditions and enables data rates up to about 8 Mbytes / second.

The connector used for the IEEE 488 bus is standardized as a 24-way Amphenol 57 series type. This provides an ideal physical interface for the standard.

The IEEE 488 or GPIB connector is very similar in format to those that were used for parallel printer ports on PCs .

The connector type used for the GPIB has been changed so that several connectors can be piggy-backed. This helps the physical setting up of the bus and prevents complications with special connection boxes or star points.Within IEEE 488, the equipment on the bus falls into three categories, although items can fulfil more than one function:Controller: As the name suggests, the controller is the entity that controls the operation of the bus. It is usually a computer and it signals that instruments are to perform the various functions. The GPIB controller also ensures that no conflicts occur on the bus. If two talkers tried to talk at the same time then data would become corrupted and the operation of the whole system would be seriously impaired. It is possible for multiple controllers to share the same bus; but only one can act as a controller at any particular time.Listener: A listener is an entity connected to the bus that accepts instructions from the bus. An example of a listener is an item such as a printer that only accepts data from the bus.

Talker: This is an entity on the bus that issues instructions / data onto the bus.

Many items will fulfil more than one function. For example a voltmeter which is controlled over the bus will act as a listener when it is being set up, and then when it is returning the data, it will act as a talker. As such it is known as a talker / listener.

GPIB Lines

GPIB consists of 24 lines, which are shared by all instruments connected to the bus. 16 lines are used for signals, while eight lines are for ground.

The signal lines are divided into these groups: a) Eight data lines b) Five interface management lines c) Three handshake lines.

The signal lines use a low-true (negative) logic convention with TTL levels. This means that a line is low (true or asserted) when it is a TTL low level, and a line is high (false or unasserted) when it is a TTL high level. The pin assignment scheme for a GPIB connector is shown below.

Data Lines

The eight data lines, DIO1 through DIO8, are used for transferring data one byte at a time. DIO1 is the least significant bit, while DIO8 is the most significant bit. The transferred data can be an instrument command or a GPIB interface command.

Data formats are vendor-specific and can be text-based (ASCII) or binary. GPIB interface commands are defined by the IEEE 488 standard.

Interface Management Lines

The interface management lines control the flow of data across the GPIB interface.

One can examine the state of the interface management lines with theBusManagementStatusproperty.

GPIB Interface Management Lines

Five lines manage the flow of information across the interface:ATN (attention) - The Controller drives ATN true when it uses the data lines to send commands, and drives ATN false when a Talker can send data messages.IFC (interface clear) - The System Controller drives the IFC line to initialize the bus and become CIC.REN (remote enable) - The System Controller drives the REN line, which is used to place devices in remote or local program mode.SRQ (service request) - Any device can drive the SRQ line to asynchronously request service from the Controller.EOI (end or identify) - The EOI line has two purposes - The Talker uses the EOI line to mark the end of a message string, and the Controller uses the EOI line to tell devices to identify their response in a parallel poll.Handshake Lines

The three handshake lines, DAV, NRFD, and NDAC, are used to transfer bytes over the data lines from the Talker to one or more addressed Listeners.

Before data is transferred, all three lines must be in the proper state. The active Talker controls the DAV line and the Listener(s) control the NRFD and NDAC lines.

The handshake process allows for error-free data transmission.

Handshake linesLineDescriptionDAVUsed by the Talker to indicate that a byte can be read by the Listeners.NRFDIndicates whether the Listener is ready to receive the byte.NDACIndicates whether the Listener has accepted the byte.The handshaking process follows these steps:

Initially, the Talker holds the DAV line high indicating no data is available, while the Listeners hold the NRFD line high and the NDAC line low indicating they are ready for data and no data is accepted, respectively.

When the Talker puts data on the bus, it sets the DAV line low, which indicates that the data is valid.

The Listeners set the NRFD line low, which indicates that they are not ready to accept new data.

The Listeners set the NDAC line high, which indicates that the data is accepted.

When all Listeners indicate that they have accepted the data, the Talker sets the DAV line high indicating that the data is no longer valid. The next byte of data can now be transmitted.

The Listeners hold the NRFD line high indicating they are ready to receive data again, and the NDAC line is held low indicating no data is accepted.

Handshake Lines

GPIB / IEEE 488 connector pin numberingGPIB Connector Pins Numbering

The diagram below shows the various pins on the standard 24 way Amphenol type 57 connector in order to identify the different pins for the pinout with their relevant function

It is worth noting that the actual pin numbers are written onto the plastic of the connector by the pins themselves. This is always worth checking to make sure orientations are correct and to eliminate errors in interpretation.

GPIB / IEEE 488 connector

GPIB PIN CONNECTIONS TABLEGPIB PIN NOGPIB LINE NAMEGPIB ABBREVIATION1Data Input / Output 1DIO12Data Input / Output 2DIO23Data Input / Output 3DIO34Data Input / Output 4DIO45End or IdentifyEOI6Data ValidDAV7Not Ready For DataNRFD8Not Data AcceptedNDAC9Interface ClearIFC10Service RequestSRQ11AttentionATN12Shield (Connected to Earth)

GPIB PIN CONNECTIONS TABLEGPIB PIN NOGPIB LINE NAMEGPIB ABBREVIATION13Data Input / Output 5DIO514Data Input / Output 6DIO615Data Input / Output 7DIO716Data Input / Output 8DIO817Remote EnableREN18Twisted pair with pin 619Twisted pair with pin 720Twisted pair with pin 821Twisted pair with pin 922Twisted pair with pin 1023Twisted pair with pin 1124Signal Ground

It can be seen from the pinout table for the GPIB connections that the DAV, NRFD and NDAC handshaking lines all run with twisted pairs as do IFC, SRQ and ATN.

Again it can be seen from the pinout table that the GPIB connections for the data lines do not have twisted pairs, but are contained within the overall screening of the cable.

DATA TRANSFER TERMINATIONTermination informs listeners that all data has been transferred. GPIB data transfer can be terminated in the following three ways:The GPIB includes an end-or-Identify(EOI) hardware line that can be asserted with the last data byte. This is the preferred method.Place a specific end-of-string(EOS) character at the end of the data string itself. Some instruments use this method in addition to the EOI line assertion.The listener counts the bytes transferred by handshaking and stops reading when the listener reaches the byte count limit. This method is often used as a default termination method because the transfer stops on the logical OR of EOI,EOS(if used) in conjunction with the byte countDATA TRANSFER RATE

To achieve the high data transfer rate that the GPIB was designed, one must limit the number of devices on the bus and the physical distance between devices.Programming Language for GPIB SystemsStandards Committee for Programmable Instruments (SCPI) is the language that is commonly used for GPIB systems.It enables the same commands to be used for any instrument that can execute them.SCPI also includes instrument-specific commands that work only on certain devices.SCPI

AdvantagesMany instruments can be controlled by the same language.It can be used with both GPIB instruments and VXI.Syntax is fairly straightforward and it has great power.

DisadvantageIt can take a while to learn as it's very detailed

Advantages of GPIB

Simple & standard hardware interfaceInterface present on many bench instrumentsRugged connectors & connectors used (although some insulation displacement cables appear occasionally).Possible to connect multiple instruments to a single controller

Disadvantages of GPIB

Bulky connectorsCable reliability poor - often as a result of the bulky cables.Low bandwidth - slow compared to more modern interfacesBasic IEEE 422 does not mandate a command language (SCPI used in later implementations but not included on all instruments.

GPIB capability is included on a large number of bench instruments, but when opting to use the facility to build a system, it is necessary to consider all the advantages and disadvantages before committing time and cost to its use.

THE END