National Instruments NI-488.2 User Manual 2

NI-488.2

NI-488.2 User Manual for Windows

NI-488.2 User Manual for Windows
June 1999 Edition
Part Number 321819D-01

Worldwide Technical Support and Product Information

National Instruments Corporate Headquarters

11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 794 0100

Worldwide Offices

Australia 03 9879 5166, Austria 0662 45 79 90 0, Belgium 02 757 00 20, Brazil 011 284 5011, Canada (Ontario) 905 785 0085, Canada (Québec) 514 694 8521, China 0755 3904939, Denmark 45 76 26 00, Finland 09 725 725 11, France 01 48 14 24 24, Germany 089 741 31 30, Hong Kong 2645 3186, India 91805275406, Israel 03 6120092, Italy 02 413091, Japan 03 5472 2970, Korea 02 596 7456, Mexico (D.F.) 5 280 7625, Mexico (Monterrey) 8 357 7695, Netherlands 0348 433466, Norway 32 27 73 00, Singapore 2265886, Spain (Madrid) 91 640 0085, Spain (Barcelona) 93 582 0251, Sweden 08 587 895 00, Switzerland 056 200 51 51, Taiwan 02 2377 1200, United Kingdom 01635 523545
For further support information, see the Technical Support Resources appendix. To comment on the documentation, send e-mail to techpubs@natinst.com.
© Copyright 1998, 1999 National Instruments Corporation. All rights reserved.

Important Information

Warranty

The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials an d work man sh ip, for a peri od of 9 0 da ys from d ate o f sh ipm ent, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instrumen ts recei ves no ti ce of such defect s d uring th e warranty perio d. National Instruments does not warrant that the op eratio n of t he soft ware shall b e uni nterrup ted or erro r free.
A Return Material Authorization (RMA) number mu st b e ob tain ed fro m the facto ry an d cl earl y marked o n t he outsi de of the package before any equipment wil l be accepted for warranty work. National Instruments will pay t he shipping costs of returning to the owner parts which are covered by warranty .
National Instruments believes that the information in this document is accurate. The document has been carefully reviewed for technical accuracy. In the event that technical or typographical errors exist, National Instruments reserves the right to make changes to subsequent editions of this document without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this d ocum ent o r th e in formati on con tained in i t.
XCEPT AS SPECIFIED HEREIN
E
ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOMER OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF
National Instruments will apply regardless of th e form o f action, wh eth er in con tract or t ort , incl udin g n e gligen ce. Any action against National Instruments must be brought within one year after the cause of action accrues. National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty provided herein does not cover damages, defects, malfuncti ons, or s ervice failu res cau sed by owne r s failure to follow the National Instruments installation, operation, or maintenance instructions; owners modification of the product; owners abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.
ATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS
. N
ATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS
, N

Copyright

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopying, recording, storing in an information retrieval system, or translating, in whole or in part, without the prior written consent of National Instruments Corporation.
USTOMER’S RIGHT TO RECOVER DAMAGES CAUSED
. C
. This limitation of the liability of
,

Trademarks

HS488™, natinst.com™, NI-488.2™, and TNT4882™C are trademarks of National Instruments Corporation. Product and company names mentioned herein are trad em arks o r trad e nam es of t heir resp ect ive com pan ies.

WARNING REGARDING MEDICAL AND CLINICAL USE OF NATIONAL INSTRUMENTS PRODUCTS

National Instruments products are not designed with com ponent s and testi ng for a level o f reli ability su itabl e for use in or in connection with surgical implants o r as cri tical co m pon ent s in an y li fe su pp ort sy stem s wh os e failure t o p erform can reasonably be expected to cause s ignifi cant inju ry t o a hu man . Appl i catio ns of Nati on al In strum ent s prod ucts involving medical or clinical treatment can create a p ote ntia l for d eath or bod il y inj ury caus ed b y p rodu ct fai l ure, or by errors on the part of the user or application designer. Because each end-user system is customized and differs from National Instruments testing platforms and because a user or application designer may use National Instruments products in combination with other products in a m ann er no t ev alu a ted or cont em p lated b y N ati onal Ins trum ents , t he user or application designer is ultimately responsible for verifying and validating the suitability of National Instruments products whenever National Instruments products are incorporated in a system or application, including, without limitation, the appropriate design , p rocess and safety l evel of such syst em or ap plicat io n.

Contents

About This Manual
Using the NI-488.2 Documentation...............................................................................xi
Accessing the NI-488.2 Online Help...............................................................xi
Conventions ...................................................................................................................xii
Related Documentation..................................................................................................xii
Chapter 1 Introduction
Setting up and Configuring Your System......................................................................1-1
Controlling More Than One Interface............................................. ................1-2
Configuration Requirements ...........................................................................1-2
Chapter 2 Measurement & Automation Explorer
Overview........................................................................................................................2-1
Starting Measurement & Automation Explorer.............................................................2-2
Getting Started with NI-488.2 .......................................................................................2-2
Troubleshoot NI-488.2 Problems ..................................................................................2-4
Add a New GPIB Interface............................................................................................2-4
Delete a GPIB Interface.................................................................................................2-5
Scan for GPIB Instruments......................................................... ...................................2-5
Instruments Not Found....................................................................................2-6
Instruments Enumeration Failed......................................................................2-6
Communicate with Your Instrument .............................................................................2-6
Basic Communication (Query/Write/Read)....................................................2-6
Advanced Communication..............................................................................2-7
View NI-488.2 Software Version..................................................................................2-8
Monitor, Record, and Display NI-488.2 Calls...............................................................2-8
View or Change GPIB Interface Settings......................................................................2-9
Windows 98/95................................................................................................2-9
Windows 2000/NT ..........................................................................................2-10
View GPIB Instrument Information ..............................................................................2-11
Change GPIB Device Templates...................................................................................2-12
Windows 98/95................................................................................................2-12
Windows 2000/NT ..........................................................................................2-13
Enable/Disable NI-488.2 DOS Support.........................................................................2-13
Windows 98/95................................................................................................2-13
Windows 2000/NT ..........................................................................................2-14
© National Instruments Corporation v NI-488.2 User Manual for Windows
Contents
Access Additional Help and Resources........................................................ ................. 2-14
NI-488.2 Online Help .....................................................................................2-14
National Instruments GPIB Web Site............................................ ................. 2-15
View or Change GPIB-ENET Network Settings (Windows 98/95 Only) .................... 2-15
Assign IP Address...........................................................................................2-15
Configure Advanced IP Settings.....................................................................2-15
Update GPIB-ENET Firmware.......................................................................2-16
Chapter 3 Developing Your NI-488.2 Application
Simple Instrument Control............................................................................................3-1
Interactive Instrument Control ......................................................................................3-2
Choosing Your Programming Methodology.................................................................3-3
Choosing a Method to Access the NI-488.2 Driver........................................3-3
NI-488.2 Language Interfaces.......................................................... 3-3
Direct Entry Access.......................................................................... 3-3
Choosing How to Use the NI-488.2 API ........................................................3-4
Communicating with a Single GPIB Device....................................3-4
Using Multiple Interfaces and/or Multiple Devices ......................... 3-5
Checking Status with Global Variables......................................................................... 3-5
Status Word (ibsta)..........................................................................................3-5
Error Variable (iberr) ......................................................................................3-7
Count Variables (ibcnt and ibcntl).................................................................. 3-7
Using Interactive Control to Communicate with Devices............................................. 3-7
Programming Models.................................................................................................... 3-8
Applications That Communicate with a Single GPIB Device........................3-8
Items to Include ................................................................................3-8
General Program Steps and Examples..............................................3-8
Applications That Use Multiple Interfaces or Communicate with
Multiple GPIB Devices................................................................................3-10
Items to Include ................................................................................3-10
General Program Steps and Examples..............................................3-10
Language-Specific Programming Instructions.............................................................. 3-12
Microsoft Visual C/C++ (Version 2.0 or Later) .............................................3-12
Borland C/C++ (Version 4.0 or Later)............................................................3-12
Visual Basic (Version 4.0 or Later)................................................................ 3-13
Direct Entry with C.........................................................................................3-13
gpib-32.dll Exports...........................................................................3-13
Directly Accessing the gpib-32.dll Exports...................................... 3-14
Running Existing NI-488.2 Applications...................................................................... 3-17
Running Existing Win32 and Win16 NI-488.2 Applications......................... 3-17
Running Existing DOS NI-488.2 Applications Under Windows 98/95 ......... 3-17
Running Existing DOS NI-488.2 Applications under Windows 2000/NT..... 3-18
NI-488.2 User Manual for Windows vi www.natinst.com
Chapter 4 Debugging Your Application
NI Spy..................................................................................................................... .......4-1
Global Status Variables .................................................................................................4-2
Existing Applications.....................................................................................................4-3
NI-488.2 Error Codes ....................................................................................................4-3
Configuration Errors............................................................. .........................................4-3
Timing Errors.................................................................................................................4-4
Communication Errors...................................................................................................4-5
Repeat Addressing...........................................................................................4-5
Termination Method........................................................................................4-5
Other Errors ...................................................................................................................4-5
Chapter 5 NI Spy Utility
Overview........................................................................................................................5-1
Starting NI Spy ..............................................................................................................5-1
Using the NI Spy Online Help.......................................................................................5-2
Locating Errors with NI Spy..........................................................................................5-2
Viewing Properties for Recorded Calls .........................................................................5-2
Exiting NI Spy ...............................................................................................................5- 3
Performance Considerations..........................................................................................5-3
Contents
Chapter 6 Interactive Control Utility
Overview........................................................................................................................6-1
Getting Started with Interactive Control........................................................................6-1
Interactive Control Syntax.............................................................................................6-4
Number Syntax...................................... ..........................................................6-4
String Syntax...................................................................................................6-4
Address Syntax...................................... ..........................................................6-5
Interactive Control Commands......................................................................................6-5
Status Word....................................................................................................................6-10
Error Information...........................................................................................................6-10
Count Information..........................................................................................................6-11
© National Instruments Corporation vii NI-488.2 User Manual for Windows
Contents
Chapter 7 NI-488.2 Programming Techniques
Termination of Data Transfers ......................................................................................7-1
High-Speed Data Transfers (HS488).............................................................................7-2
Enabling HS488..............................................................................................7-2
System Configuration Effects on HS488........................................................7-3
Waiting for GPIB Conditions.......................................... ..............................................7-4
Asynchronous Event Notification in Win32 NI-488.2 Applications ............................ 7-4
Calling the ibnotify Function .......................................................................... 7-4
ibnotify Programming Example......................................................................7-5
Writing Multithreaded Win32 NI-488.2 Applications..................................................7-9
Device-Level Calls and Bus Management....................................................................7-11
Talker/Listener Applications.........................................................................................7-11
Serial Polling................................................................................................................. 7-12
Service Requests from IEEE 488 Devices......................................................7-12
Service Requests from IEEE 488.2 Devices................................................... 7-12
Automatic Serial Polling.................................................................................7-13
Stuck SRQ State ............................................................................... 7-13
Autopolling and Interrupts................................................................ 7-14
SRQ and Serial Polling with Device-Level Traditional NI-488.2 Calls......... 7-14
SRQ and Serial Polling with Multi-Device NI-488.2 Calls ............................ 7-15
Example 1: Using FindRQS ............................................................. 7-16
Example 2: Using AllSpoll............................................................... 7-16
Parallel Polling ........................................................... ...................................................7-17
Implementing a Parallel Poll............................. ... ...........................................7-17
Parallel Polling with Traditional NI-488.2 Calls..............................7-17
Parallel Polling with Multi-Device NI-488.2 Calls.......................... 7-19
Appendix A GPIB Basics
Appendix B Status Word Conditions
Appendix C Error Codes and Solutions
Appendix D Windows 98/95: Troubleshooting and Common Questions
NI-488.2 User Manual for Windows viii www.natinst.com
Appendix E Windows 2000/NT: Common Questions
Appendix F Technical Support Resources
Glossary
Index

Figures

Figure 1-1. Linear and Star System Configuration..................................................1-1
Figure 1-2. Example of Multiboard System Configuration.....................................1-2
Figure 2-1. Measurement & Automation Explorer ..................................................2-2
Figure 2-2. Viewing Documentation on Your CD................................... ................2-3
Figure 2-3. NI-488.2 Troubleshooting Wizard ........................................................2-4
Figure 2-4. NI-488.2 Communicator ...................................... .................................2-7
Figure 2-5. NI-488.2 Calls Recorded by NI Spy .....................................................2-9
Figure 2-6. Properties Dialog Box in Windows 98/95.............................................2-10
Figure 2-7. GPIB Configuration Utility in Windows NT ........................................2-11
Contents
Figure 3-1. NI-488.2 Communicator ...................................... ... ..............................3-2
Figure 4-1. NI-488.2 Calls Recorded by NI Spy .....................................................4-2
Figure 5-1. NI-488.2 Calls Recorded by NI Spy .....................................................5-2
Figure 6-1. Instrument Address in Measurement & Automation Explorer .............6-2
Figure A-1. GPIB Address Bits ................................................................................A-2

Tables

Table 2-1. Measurement & Automation Explorer Instrument Information............2-12
Table 3-1. Status Word Layout...............................................................................3-6
Table 6-1. Syntax for Device-Level Traditional NI-488.2 Calls in
Interactive Control.................................................................................6-5
© National Instruments Corporation ix NI-488.2 User Manual for Windows
Contents
Table 6-2. Syntax for Board-Level Traditional NI-488.2 Calls in
Interactive Control ................................................................................6-7
Table 6-3. Syntax for Multi-Device NI-488.2 Calls in Interactive Control........... 6-8
Table 6-4. Auxiliary Functions in Interactive Control...........................................6-9
Table A-1. GPIB Handshake Lines.........................................................................A-3
Table A-2. GPIB Interface Management Lines ...................................................... A-3
Table B-1. Status Word Layout .............................................................................. B-1
Table C-1. GPIB Error Codes .................................................................................C-1
Table D-1. Device Manager Status Codes.............................................................. D-3
NI-488.2 User Manual for Windows x www.natinst.com

About This Manual

This manual describes the features and functions of the NI-488.2 software for Windows. You can use the NI-488.2 software for Windows with Windows 95, Windows 98, Windows NT version 4.0, or Windows 2000. This manual assumes that you are already familiar with Windows.
Using the NI-488.2 Documentation
The following NI-488.2 documentation is available on your NI-488.2 for Windows CD:
The Getting Started card briefly describes how to install the NI-488.2 software and your GPIB hardware.
This manual, NI-488.2 User Manual for Windows, describes the features and functions of the NI-488.2 software for Windows.
The NI-488.2 Function Reference Manual for Windows describes the NI-488.2 API.
The GPIB Hardware Guide contains detailed instructions on how to install and configure your GPIB hardware. This guide also includes hardware and software specifications and compliance information.
To view these documents online, insert your NI-488.2 for Windows CD. When the NI-488.2 Software for Windows screen appears, select the View Documentation option. The Vie w Documentation W izard helps you find the documentation that you want to view. You can also view these documents at
http://www.natinst.com/manuals/
.

Accessing the NI-488.2 Online Help

The NI-488.2 for Windows Online Help addresses questions you might have about NI-488.2, includes troubleshooting information, and describes the NI-488.2 API. You can access the NI-488.2 online help as follows:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
3. Right-click on your GPIB interface and select NI-488.2 Help from the drop-down menu that appears.
© National Instruments Corporation xi NI-488.2 User Manual for Windows
About This Manual

Conventions

The following conventions appear in this manual:
» The » symbol leads you through nested menu items and dialog box options
to a final action. The sequence File»Page Setup»Options directs you to pull down the File menu, select the Page Setup item, and select Options from the last dialog box.
This icon denotes a note, which alerts you to important information.
bold Bold text denotes items that you must select or click on in the software,
such as menu items and dialog box options. Bold text also denotes parameter names.
IEEE 488 and IEEE 488 and IEEE 488.2 refer to the ANSI/IEEE Standard 488.1-1987 IEEE 488.2 and the ANSI/IEEE Standard 488.2-1992, respectively, which define
the GPIB.
italic Italic text denotes variables, emphasis, a cross reference, or an introduction
to a key concept. This font also denotes text that is a placeholder for a w ord or value that you must supply.
monospace
monospace bold
Text in this font denotes text or characters that you should enter from the keyboard, sections of code, programming examples, and syntax examples. This font is also used for the proper names of disk drives, paths, directories, programs, subprograms, subroutines, device names, functions, operations, variables, filenames and extensions, and code excerpts.
Bold text in this font denotes the messages and responses that the computer automatically prints to the screen. This font also emphasizes lines of code that are different from the other examples.

Related Documentation

The following documents contain information that you may find helpful as you read this manual:
ANSI/IEEE Standard 488.1-1987, IEEE Standard Digital Interface for Programmable Instrumentation
ANSI/IEEE Standard 488.2-1992, IEEE Standard Codes, Formats, Protocols, and Common Commands
NI-488.2 User Manual for Windows xii www.natinst.com
Introduction
This chapter describes how to set up your GPIB system.

Setting up and Configuring Your System

Devices are usually connected with a cable assembly consisting of a shielded 24-conductor cable with both a plug and receptacle connector at each end. With this design, you can link devices in a linear configuration, a star configuration, or a combination of the two configurations. Figure 1-1 shows the linear and star configurations.
1
Device A
Device B
Device C
a. Linear Configuration
Figure 1-1.
© National Instruments Corporation 1-1 NI-488.2 User Manual for Windows
Linear and Star System Configuration
b. Star Configuration
Device DDevice A
Device CDevice B
Chapter 1 Introduction

Controlling More Than One Interface

Figure 1-2 shows an example of a multiboard system configuration. is the access interface for the voltmeter, and for the plotter and printer. The control functions of the devices automatically access their respective interfaces.
One
GPIB
Another
GPIB
Digital
Voltometer
gpib0
Plotter
gpib1
is the access interface
gpib1
gpib0
Printer
Figure 1-2.
Example of Multiboard System Configuration

Configuration Requirements

To achieve the high data transfer rate that the GPIB was designed for, you must limit the number of devices on the bus and the physical distance between devices. The following restrictions are typical:
A maximum separation of 4 m between any two devices and an average separation of 2 m over the entire bus.
A maximum total cable length of 20 m.
A maximum of 15 devices connected to each bus, with at least
two-thirds powered on.
NI-488.2 User Manual for Windows 1-2 www.natinst.com
Chapter 1 Introduction
For high-speed operation, the following restrictions apply:
All devices in the system must be powered on.
Cable lengths must be as short as possible with up to a maximum of
15 m of cable for each system.
There must be at least one equivalent device load per meter of cable. If you want to exceed these limitations, you can use a bus extender to
increase the cable length or a bus expander to increase the number of device loads. You can order bus extenders and expanders from National Instruments.
© National Instruments Corporation 1-3 NI-488.2 User Manual for Windows
Measurement & Automation Explorer
This chapter describes Measurement & Automation Explorer, an interactive utility you can use with the NI-488.2 software.
To start Measurement & Automation Explorer, select Start»Programs»National Instruments NI-488.2»Explore GPIB.

Overview

You can perform the following GPIB-related tasks in Measurement & Automation Explorer:
Establish basic communication with your GPIB instruments.
Scan for instruments connected to your GPIB interface.
Launch the NI-488.2 Getting Started Wizard to get started with
GPIB instrument communication.
Launch the NI-488.2 Troubleshooting Wizard to troubleshoot GPIB and NI-488.2 problems.
Launch NI Spy to monitor NI-488.2 or VISA API calls to GPIB interfaces.
View information about your GPIB hardware and NI-488.2 software.
Reconfigure the GPIB interface settings.
Locate additional help resources for GPIB and NI-488.2.
2
© National Instruments Corporation 2-1 NI-488.2 User Manual for Windows
Chapter 2 Measurement & Automation Explorer

Starting Measurement & Automation Explorer

To start Measurement & Automation Explorer, select Start»Programs»National Instruments NI-488.2»Explore GPIB. Figure 2-1 shows Measurement & Automation Explorer.
Figure 2-1.
Measurement & Automation Explorer

Getting Started with NI-488.2

To get started with GPIB instrument communication using Measurement & Automation Explorer, complete the following steps:
1. Refer to your Getting Started card and install the NI-488.2 software and your GPIB hardware.
If you do not have a Getting Started card, complete the following steps to view your getting started documentation:
a. Insert the NI-488.2 for Windows CD.
NI-488.2 User Manual for Windows 2-2 www.natinst.com
Chapter 2 Measurement & Automation Explorer
b. When the NI-488.2 Software for Windows screen appears, select
the View Documentation option, as shown in Figure 2-2.
Figure 2-2.
Viewing Documentation on Your CD
The View Documentation Wizard helps you find the documentation that you want to view.
2. Use the NI-488.2 Getting Started Wizard to verify the installation and establish basic communication with your GPIB instruments.
Note
After you install the NI-488.2 software and restart your system, the NI-488.2
Getting Started Wizard runs automatically . To start it within Measurement & Automation Explorer, select Measurement & Automation in the left window pane and select Help»Getting Started»NI-488.2 Getting Started Wizard.
After you install the NI-488.2 software and your GPIB hardware, you can run an existing NI-488.2 application or develop a new NI-488.2 application.
© National Instruments Corporation 2-3 NI-488.2 User Manual for Windows
Chapter 2 Measurement & Automation Explorer

Troubleshoot NI-488.2 Problems

To troubleshoot NI-488.2 problems, run the NI-488.2 Troubleshooting Wizard, as follows:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Select Help»Troubleshooting»NI-488.2 Troubleshooting Wizard. The Troubleshooting Wizard tests your GPIB interface and displays
the results, as shown in Figure 2-3.
Figure 2-3.
To view online help for the Troubleshooting Wizard, click on the Help button.
NI-488.2 Troubleshooting Wizard

Add a New GPIB Interface

To add a new GPIB interface to your system, complete the following steps:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Select the Devices and Interfaces folder.
3. In the right window pane, double-click on the Add Device or Interface icon.
The Insert New dialog box appears.
4. Double-click on the GPIB Interface item. If you are using Windows 98/95, the Add GPIB Hardware Wizard
appears. If you are using Windows 2000/NT, the NI-488.2 Configuration utility appears.
NI-488.2 User Manual for Windows 2-4 www.natinst.com
5. Use either the Add GPIB Hardware Wizard or the NI-488.2 Configuration utility to add your interface.

Delete a GPIB Interface

Before you physically remove a GPIB interface from your system, you must remove the hardware information, as follows:
Note
If your interface is a PCMCIA-GPIB, click on the PC Card icon on the taskbar to
stop the PC Card. When you stop the PC Card, the system removes the hardware information from the Device Manager.
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
3. Right-click on your GPIB interface and select Delete Interface from the drop-down menu that appears.
4. When prompted, click on the Yes button to confirm the removal of your interface.
Chapter 2 Measurement & Automation Explorer

Scan for GPIB Instruments

To scan for instruments connected to your GPIB interface or to add a new instrument to your system, complete the following steps:
1. Make sure that your instrument is powered on and connected to your GPIB interface.
2. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
3. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
4. Right-click on your GPIB interface and select Scan for Instruments from the drop-down menu that appears.
Measurement & Automation Explorer displays the connected instruments in the right window pane.
© National Instruments Corporation 2-5 NI-488.2 User Manual for Windows
Chapter 2 Measurement & Automation Explorer

Instruments Not Found

Instruments not Found
If the pane, Measurement & Automation Explorer did not find any instruments. To solve this problem, make sure that your GPIB instruments are powered on and properly connected to the GPIB interface with a GPIB cable. Then, scan for instruments again, as described in the previous section, Scan for
GPIB Instruments.

Instruments Enumeration Failed

Instruments Enumeration Failed
If the window pane, Measurement & Automation Explorer found too many Listeners on the GPIB. To solve this problem, refer to the following possible solutions:
If you have a running GPIB Analyzer with the GPIB handshake option enabled, disable the GPIB handshake option in the GPIB Analyzer.
If you have a GPIB extender in your system, Measurement & Automation Explorer cannot detect any instruments connected to your GPIB interface. Instead, you can verify communication with your instruments using the Interactive Control utility. To do so, select Tools»NI-488.2 Utilities»Interactive Control. For more information about verifying instrument communication, type
"Interactive Control:getting started"
Control command prompt.
message appears in the right window
message appears in the right
help
at the Interactive

Communicate with Your Instrument

To establish basic or advanced communication with your instruments, refer to the following sections.
For more information about instrument communication and a list of the commands that your instrument understands, refer to the documentation that came with your GPIB instrument. Most instruments respond to the
command by returning an identification string.
*IDN?

Basic Communication (Query/Write/Read)

To establish basic communication with your instrument, use the NI-488.2 Communicator, as follows:
1. If you have not already done so, scan for connected instruments as described in the previous section, Scan for GPIB Instruments.
2. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
NI-488.2 User Manual for Windows 2-6 www.natinst.com
Chapter 2 Measurement & Automation Explorer
3. Expand the Devices and Interfaces directory by clicking on the + next
to the folder.
4. Select your GPIB interface. Measurement & Automation Explorer displays the connected
instruments in the right window pane.
5. Right-click on your GPIB instrument and select Communicate with Instrument from the drop-down menu that appears.
The NI-488.2 Communicator dialog box appears, as shown in Figure 2-4.
Figure 2-4.
NI-488.2 Communicator
6. T ype a command in the Send String f ield and do one of the following:
To write a command to the instrument then read a response back,
click on the Query button.
To write a command to the instrument, click on the Write button.
To read a response from the instrument, click on the Read button.
To view sample C/C++ code that performs a simple query of a GPIB instrument, click on the Show Sample button.

Advanced Communication

For advanced interactive communication with GPIB instruments, use the Interactive Control utility, as follows:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
© National Instruments Corporation 2-7 NI-488.2 User Manual for Windows
Chapter 2 Measurement & Automation Explorer
3. Right-click on your GPIB interface and select Interactive Control
from the drop-down menu that appears.
4. At the command prompt, type NI-488.2 API calls to communicate interactively with the your instrument. For example, you might use
ibdev, ibclr, ibwrt, ibrd
, and
ibonl
.
T o view the online help for Interacti ve Control, type Control command prompt.
help

View NI-488.2 Software Version

To view the NI-488.2 software version, complete the following steps:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Select Help»About Measurement & Automation Explorer. The Value column in the About Measurement & Automation
Explorer dialog box displays the version number of the NI-488.2 software.

Monitor, Record, and Display NI-488.2 Calls

To monitor NI-488.2 calls, use NI Spy, as follows:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
3. Right-click on your GPIB interface and select NI Spy from the drop-down menu that appears.
4. On the NI Spy toolbar, click on the blue arrow button to start a capture.
5. Start the NI-488.2 application that you want to monitor.
at the Interactive
NI-488.2 User Manual for Windows 2-8 www.natinst.com
Chapter 2 Measurement & Automation Explorer
NI Spy records and displays all NI-488.2 calls, as shown in Figure 2-5.
Figure 2-5.
For more information about using NI Spy, select Help»Help Topics in NI Spy or refer to Chapter 5, NI Spy Utility.
NI-488.2 Calls Recorded by NI Spy

View or Change GPIB Interface Settings

To view or change the settings of your GPIB interface, refer to one of the following sections.
Windows 98/95
To view or change your interface settings in Windows 98/95, complete the following steps:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
3. Right-click on your GPIB interface and select Properties from the drop-down menu that appears.
© National Instruments Corporation 2-9 NI-488.2 User Manual for Windows
Chapter 2 Measurement & Automation Explorer
The Properties dialog box appears. Figure 2-6 shows the Properties dialog box for an AT-GPIB/TNT (Plug and Play) interface.

Figure 2-6. Properties Dialog Box in Windows 98/95

If you need more information about a field in the Properties dialog box, click on the ? button in the upper-right corner of the dialog box, then click on the field.
4. (Optional) Change the settings for your interface.
Windows 2000/NT
To view or change GPIB interface information, complete the following steps:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
3. Right-click on your GPIB interface and select Properties from the drop-down menu that appears.
NI-488.2 User Manual for Windows 2-10 www.natinst.com
Chapter 2 Measurement & Automation Explorer
The GPIB Configuration dialog box appears. Figure 2-7 shows the GPIB Configuration dialog box for an AT-GPIB/TNT (Plug and
Play) interface in Windows NT.
Figure 2-7.
4. Select your GPIB Board and click on the Configure button.
5. (Optional) Change the settings for your interface. For more information about changing the settings for your interface, click
on the Help button.
GPIB Configuration Utility in Windows NT

View GPIB Instrument Information

To view information about your GPIB instruments, complete the following steps:
1. If you have not already done so, scan for connected instruments as described in the Scan for GPIB Instruments section earlier in this chapter.
2. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
3. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
4. Select your GPIB interface. Measurement & Automation Explorer displays the connected
instruments in the right window pane. Table 2-1 describes the
© National Instruments Corporation 2-11 NI-488.2 User Manual for Windows
Chapter 2 Measurement & Automation Explorer
instrument information that Measurement & Automation Explorer displays.
Table 2-1.
Measurement & Automation Explorer Instrument Information
Column Description
Name Logical instrument name assigned by Measurement &
Automation Explorer
Type Instruments response to the identification query
(
*IDN?
)
Value Primary (PAD) and secondary (SAD) addresses of the
instrument
Description Identifies the instrument as a GPIB instrument

Change GPIB Device Templates

For older NI-488.2 applications, you might need to modify one o f the device templates to find a given GPIB instrument by name, for example,
ibfind("fluke45")
preferred
ibfind ibdev
ibdev
to obtain device handles and use
to dynamically configure your GPIB device handle.
eliminates unneccessary device name requirements. If you must modify a device template, refer to one of the following sections.
. Older applications still use
to obtain a device handle. In new applications, avoid using
ibfind
instead. You can use
ibdev
instead of the
also
ibdev
Windows 98/95
To reconfigure GPIB device templates in Windows 98/95, complete the following steps:
1. Select Start»Settings»Control Panel.
2. Double-click on the System icon.
3. Select the Device Manager tab and click on the View devices by type
button.
4. Click on the National Instruments GPIB Interfaces icon.
5. Click on the Properties button.
6. Select the Device Templates tab and rename the template as described
in your application documentation.
7. Click on the OK button twice to save your changes and exit.
NI-488.2 User Manual for Windows 2-12 www.natinst.com
Chapter 2 Measurement & Automation Explorer
Windows 2000/NT
To reconfigure GPIB device templates in Windows 2000/NT, complete the following steps:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
3. Right-click on any GPIB interface and select Properties from the drop-down menu that appears.
4. Select the device template that you want to modify, such as DEV1.
5. Click on the Configure button and rename the device template as described in your application documentation.
6. Click on the OK button twice to save your changes and exit.

Enable/Disable NI-488.2 DOS Support

To enable or disable DOS support for your NI-488.2 application, refer to one of the following sections.
Windows 98/95
To enable or disable NI-488.2 DOS support in Windows 98/95, complete the following steps:
1. Make sure that no older version of the NI-488.2 DOS device driver is being loaded from your following steps:
a. Locate your b. Find the following line:
device=<path>\gpib.com
where
<path>
is located.
c. If that line appears, type
follows:
REM device=<path>\gpib.com
d. Save your
2. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
© National Instruments Corporation 2-13 NI-488.2 User Manual for Windows
config.sys
config.sys
config.sys
refers to the drive and directory where
REM
file and close it.
file. To do so, complete the
file and open it for editing.
gpib.com
at the beginning of the line, as
Chapter 2 Measurement & Automation Explorer
3. Expand the Devices and Interfaces directory by clicking on the + next
to the folder.
4. Click on your GPIB interface and select Tools»Settings»NI-488.2
from the Explorer menu.
5. Enable or disable DOS support in the NI-488.2 Settings dialog box and click on the OK button.
6. If you are prompted to do so, restart your system.
Windows 2000/NT
To enable NI-488.2 DOS support in Windows 2000/NT, complete the following steps:
1. Open your directory (for example,
2. Find the following lines:
REM ***To run DOS GPIB applications, uncomment the REM ***following line REM device=<path>\doswin16\gpib-nt.com
where
<path>
software.
3. Remove
device=<path>\doswin16\gpib-nt.com
config.nt
is the directory in which you installed the NI-488.2
from the last line so that it reads as follows:
REM
file, located in the Windows NT system32
c:\windows\system32
).
To disable DOS support, add
back to the line where it was removed.
REM

Access Additional Help and Resources

To access additional help and resources for the NI-488.2 software and your GPIB hardware, refer to the following sections.

NI-488.2 Online Help

The NI-488.2 for Windows Online Help addresses questions you might have about NI-488.2, includes troubleshooting information, and describes the NI-488.2 API. You can access the NI-488.2 online help as follows:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
NI-488.2 User Manual for Windows 2-14 www.natinst.com
Chapter 2 Measurement & Automation Explorer
3. Right-click on your GPIB interface and select NI-488.2 Help from the
drop-down menu that appears.

National Instruments GPIB Web Site

To access the National Instruments Web site for GPIB, select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer. Then, select Help»National Instruments on the Web»GPIB Home Page.
View or Change GPIB-ENET Network Settings (Windows 98/95 Only)
To view or change the network settings of your GPIB-ENET, refer to the following sections. For more information about your GPIB-ENET network settings, refer to the Getting Started with Your GPIB-ENET and the NI-488.2 Software for Windows 98/95 manual.

Assign IP Address

You can run the Assign IP Address utility in Measurement & Automation Explorer, as follows:
1. Contact your network administrator to determine whether you should use the Assign IP Address utility to assign the IP address manually.
2. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
3. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
4. Right-click on your GPIB-ENET interface and select Assign IP Address from the drop-down menu that appears.
To view the built-in, context-sensitive help for the Assign IP Address utility, click on the Help button.

Configure Advanced IP Settings

You can run the Advanced IP Settings utility in Measurement & Automation Explorer, as follows:
1. Contact your network administrator.
2. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
© National Instruments Corporation 2-15 NI-488.2 User Manual for Windows
Chapter 2 Measurement & Automation Explorer
3. Expand the Devices and Interfaces directory by clicking on the + next
to the folder.
4. Right-click on your GPIB-ENET interface and select Advanced IP Settings from the drop-down menu that appears.
To view the built-in, context-sensitive help for the Advanced IP Settings utility, click on the Help button.

Update GPIB-ENET Firmware

You can run the Update Firmware utility in Measurement & Automatio n Explorer, as follows:
1. Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer.
2. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
3. Right-click on your GPIB-ENET interface and select Update Firmware from the drop-down menu that appears.
T o view the b uilt-in, context-sensitiv e help for the Update Firmware utility , click on the Help button.
NI-488.2 User Manual for Windows 2-16 www.natinst.com
Loading...
+ 105 hidden pages