You are on page 1of 3

Document Type: Tutorial NI Supported: Yes Publish Date: Aug 24, 2009

GPIB Instrument Control Tutorial


Table of Contents 1. 2. 3. 4. Overview of GPIB Assembling GPIB Instrument Control System How to Create a VISA Resource for an Instrument in MAX Related Links

Overview of GPIB For more than 40 years the IEEE 488 bus, also known as the general-purpose interface bus (GPIB), has provided a standard, high-speed interface for communication between instruments and controllers from a multitude of vendors. GPIB is used across a wide variety of industrial instrument control applications. For more information see The History of GPIB. Assembling GPIB Instrument Control System

A basic GPIB Instrument Control system consists of four parts: 1. PC 2. GPIB controller 3. GPIB cable 4. GPIB instrument Setting up the PC. PCI-based GPIB controller boards offer a simple, seamless bridge between the PC and the GPIB instrument. Additionally, stand-alone GPIB controllers communicate via serial, USB, or Ethernet/LXI. As a result GPIB instruments can transmit their data across the room or around the world. Additionally, the National Instruments Instrument Driver Network has more than 7000 instrument drivers to choose from, as well as tutorials on how to use them to control your instrument. Configuring the Controller. Depending on the GPIB controller manufacturer, some kind of instrument control software driver will need to be installed before the device will function. National Instruments GPIB controllers come with their own GPIB driver and Measurement & Automation Explorer (MAX). MAX scans for connected instruments, confirms communication, and creates the necessary handles for programming. Connecting GPIB Controller to Instrument. Once the controller is installed and working properly, the GPIB cable can be connected from the controller to the instrument. In accordance with the IEEE 488.2 standard, with a single controller you can control up to 15 different instruments connected in either a daisy-chain or star topology. How to Create a VISA Resource for an Instrument in MAX

If you are using a GPIB controller from Agilent/HP (HPIB), and want to use LabVIEW or another National Instruments program to control it, please refer to Can I Use Both National Instruments (GPIB) and Agilent/HP (HPIB) Controllers in the Same System? If you are using a National Instruments controller, the MAX utility comes with the NI-488 driver for your controller. MAX makes GPIB instrument detection and control easy by providing you tools to search for connecting instruments, and send and receive communication with your device. Open MAX by going to Start>>Programs>>National Instruments>>Measurement & Automation.

Figure 1. MAX Main Menu To confirm that your GPIB device is connected properly, expand the Devices and Interfaces subdirectory below My System. Then, select your GPIB controller. In this tutorial we are using a PCI-GPIB controller. If you are using a USB, serial, or Ethernet controller, the name may be slightly different. Click on Scan For Instruments.

1/3

www.ni.com

Figure 2. Scanning for Instruments in MAX If your GPIB device is SCPI compliant, the name and address will appear in main window.

Figure 3. GPIB Device Found If your device did not appear, please refer to GPIB Installation/Configuration Troubleshooter. Also refer to KnowledgeBase 1UO68A5P: "Scan for Instruments" Fails in Measurement and Automation Explorer. MAX takes care of creating the necessary resources for VISA communication with your GPIB instrument. By selecting the instrument in from the subdirectory on the left, and then selecting its VISA Properties tab (circled in red at the bottom of Figure 4), you can change the VISA Resource Name of the device and communicate with it by clicking on Communicate with Instrument (SCPI commands), or Open VISA Test Panel (non-SCPI commands).

Figure 4. Opening VISA Properties Tab Related Links NI-VISA Help Easily Connect to Any Instrument Using LabVIEW Instrument Drivers Developer Zone Tutorial: Instrument Control Fundamentals: Main Page Developer Zone Tutorial: Instrument Control Fundamentals: Instrument Control Software

Legal This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may

2/3

www.ni.com

not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE ( http://ni.com/legal/termsofuse/unitedstates/us/).

3/3

www.ni.com

You might also like