Click here to Skip to main content
Click here to Skip to main content

Add GPIB Support to Your Desktop

, 12 Dec 2003
Rate this:
Please Sign up or sign in to vote.
Add General Purpose Interface Bus (GPIB) capabilities to your desktop computer for measuring purposes.

Command/Query GPIB Demo

Introduction

GPIB is an abbreviation of General Purpose Interface Bus, and is a digital 8-bit parallel communications interface with data transfer rates up to 1 Mbyte/s. The bus supports one System Controller, usually a computer, and up to 15 additional instruments. Because the GPIB is an 8-bit parallel interface with fast data transfer rates, it gained popularity in other applications such as intercomputer communication and peripheral control.

The IEEE-488 (GPIB) bus was developed to connect and control programmable instruments, and to provide a standard interface for communication between instruments from different sources. Hewlett Packard (today the Test & measurement's division's name is Agilent Technologies) originally developed the interfacing technique, and called it HP-IB. The interface quickly gained popularity in the computer industry. Because the interface was so versatile, the IEEE committee renamed it GPIB.

The intention was to create a reliable bus system especially designed for connecting computers and instruments. This networked system has all features that are required to create a measurement system. Remote control of instruments is one aspect of these features, but there are other more important features like data handshake for reliable operation and real-time response capability, only to name a few.

IEEE-488 Overview

Almost any instrument can be used with the IEEE-488 specification, because it says nothing about the function of the instrument itself, or about the form of the instrument's data. Instead, the specification defines a separate component, the interface, that can be added to the instrument. The signals passing into the interface from the IEEE-488 bus and from the instrument are defined in the standard. The instrument does not have complete control over the interface. Often the bus controller tells the interface what to do. The Active Controller performs the bus control functions for all the bus instruments.

IEEE Standard 488.2-1987 encouraged a new level of growth and acceptance of the IEEE 488 bus or GPIB by addressing problems that had arisen from the original IEEE 488 standard. IEEE 488.2 was drafted on the premise that it stay compatible with the existing IEEE 488.1 standard. The overriding concept used in the IEEE 488.2 specification for the communication between Controllers and instruments is that of "precise talking" and "forgiving listening". In other words, IEEE 488.2 exactly defined how both IEEE 488.2 Controllers and IEEE 488.2 instruments talk so that a completely IEEE 488.2-compatible system can be highly reliable and efficient. The standard also required that IEEE 488.2 devices be able to work with existing IEEE 488.1 devices by accepting a wide range of commands and data formats as a Listener. You obtain the true benefits of IEEE 488.2 when you have a completely IEEE 488.2-compatible system.

The SCPI specification expanded the IEEE 488.2 common command set by defining a single, comprehensive command set suitable for all instruments. For example, all SCPI-compatible voltmeters, regardless of manufacturer or model, respond to the same command for reading AC voltage. Their response format is also the same. SCPI embraces many of the commands and protocols that the hardware-independent portion of the IEEE 488.2 standard defines. Figure 2 shows the structure of the GPIB standards.

Following image shows the structure of GPIB standard:

GPIB Structure - Taken from National Instruments Web Site (ni.com)

How we can use GPIB?

For using GPIB features to redirect captured data from an electronic device (like a simple voltmeter or a very complex spectrum analyzer), you must have a GPIB interface card, a IEEE-488 cable and a single PC!

Following pictures show AXIOM GPIB interface card and IEEE-488 cable to connect measurement device to PC.

AXIOM AX5488 GPIB Interface Card

AXIOM AX5488 GPIB Interface Card (Used in this project)

IEEE-488 cable for connecting GPIB interface card to GPIB capable device

In this project, I use Tektronix TDS2024 Digital Oscilloscope. Following picture shows the device:

Digital Oscilloscope

Every measurement device has a complete list of commands and queries to redirect the captured data from the device and transfer it to the PC. For getting the list of these commands or queries, you must read the device programming manual. Notice that commands are different for different devices.

Summary

The IEEE-488.1 standard greatly simplified the interconnection of programmable instruments by clearly defining mechanical, hardware, and electrical protocol specifications. For the first time, instruments from different manufactures were connected by a standard cable. This standard does not address data formats, status reporting, message exchange protocol, common configuration commands, or device specific commands.

The IEEE-488.2 standard enhances and strengthens the IEEE-488.1 standard by specifying data formats, status reporting, error handling, controller functionality, and common instruments commands. It focuses mainly on the software protocol issues and thus maintains compatibility with the hardware- oriented IEEE-488.1 standard. IEEE-488.2 systems tend to be more compatible and reliable.

For more information about GPIB Hardware and Software Specifications, click here.

Enjoy!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

A. Riazi
CEO Misbah3Com
Iran (Islamic Republic Of) Iran (Islamic Republic Of)
I was born in Shiraz, a very beautiful famous city in Iran. I started programming when I was 12 years old with GWBASIC. Since now, I worked with various programming languages from Basic, Foxpro, C/C++, Visual Basic, Pascal to MATLAB and now Visual C++.
I graduated from Iran University of Science & Technology in Communication Eng., and now work as a system programmer for a telecommunication industry.
I wrote several programs and drivers for Synthesizers, Power Amplifiers, GPIB, GPS devices, Radio cards, Data Acqusition cards and so many related devices.
I'm author of several books like Learning C (primary and advanced), Learning Visual Basic, API application for VB, Teach Yourself Object Oriented Programming (OOP) and etc.
I'm winner of January, May, August 2003 and April 2005 best article of month competetion, my articles are:

You can see list of my articles, by clicking here


Comments and Discussions

 
QuestionHow to build code for GPIB NI-488.2 (National Instrument ) Pinmembermanzoor2317-Sep-08 8:20 
GeneralLink to driver is broken Pinmemberholgerl5-Jun-06 22:04 
AnswerRe: Link to driver is broken PinmemberA. Riazi6-Jun-06 5:08 
GeneralAbout New GPIB Card Driver for Windows!! PinsussEnsign Yeh3-Jun-04 21:35 
GeneralRe: About New GPIB Card Driver for Windows!! PinmemberA. Riazi4-Jun-04 2:09 
GeneralRe: About New GPIB Card Driver for Windows!! PinsussEnsign Yeh7-Jun-04 18:35 
Questionwhat have you done is very useful to me! Pinmembersamxuysu1-Jun-04 21:42 
AnswerRe: what have you done is very useful to me! PinmemberA. Riazi2-Jun-04 0:56 
Wink | ;)
GeneralReading Data From Spectrum Analyser PinmemberKetan Vyas8-Mar-04 19:06 
GeneralRe: Reading Data From Spectrum Analyser PinmemberA. Riazi8-Mar-04 19:40 
GeneralRe: Reading Data From Spectrum Analyser PinmemberKetan Vyas9-Mar-04 16:36 
GeneralYou 'da man! PinmemberNitron14-Dec-03 11:02 
GeneralRe: You 'da man! PinmemberA. Riazi15-Dec-03 0:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 13 Dec 2003
Article Copyright 2003 by A. Riazi
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid