Resumo do conteúdo contido na página número 1
™
NI-488.2
User Manual for Windows
January 1996 Edition
Part Number 370902A-01
© Copyright 1993, 1996 National Instruments Corporation.
All Rights Reserved.
Resumo do conteúdo contido na página número 2
National Instruments Corporate Headquarters 6504 Bridge Point Parkway Austin, TX 78730-5039 (512) 794-0100 Technical support fax: (800) 328-2203 (512) 794-5678 Branch Offices: Australia 03 9 879 9422, Austria 0662 45 79 90 0, Belgium 02 757 00 20, Canada (Ontario) 519 622 9310, Canada (Québec) 514 694 8521, Denmark 45 76 26 00, Finland 90 527 2321, France 1 48 14 24 24, Germany 089 741 31 30, Hong Kong 2645 3186, Italy 02 48301892, Japan 03 5472 2970, Korea 02 596 7456, Mexico 95 800 010 0793, N
Resumo do conteúdo contido na página número 3
Limited Warranty The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, 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 Instruments receives notice of such defects during the warranty period. National Ins
Resumo do conteúdo contido na página número 4
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. Trademarks ® ™ ™ NI-488 , NI-488.2 , and TNT4882C are trademarks of National Instruments Corporation. Product and company names listed are trademarks or trade names of their respective
Resumo do conteúdo contido na página número 5
Contents About This Manual ............................................................................................... xiii How to Use This Manual Set........................................................................... xiii Organization of This Manual........................................................................... xiv Convention
Resumo do conteúdo contido na página número 6
Contents Chapter 3 Developing Your Application ............................................................................ 3-1 Choosing How to Access the NI-488.2 DLL................................................... 3-1 Choosing Between NI-488 Functions and NI-488.2 Routines ........................ 3-1 Using NI-488 Functions: One Device for Each Board..................... 3-2 NI-488 Device Functions .................................................... 3-2 NI-488 Board Functions ............
Resumo do conteúdo contido na página número 7
Contents Method 2. Generate an Import Library Using implib..................................................... 3-20 Method 3. Use LoadLibrary and GetProcAddress............. 3-20 Direct Entry with Visual Basic.......................................................... 3-23 Chapter 4 Debugging Your Application............................................................................. 4-1 Running wibtest .........................................................................................
Resumo do conteúdo contido na página número 8
Contents ! (Repeat Previous Function)............................................................. 5-15 - (Turn OFF Display) and + (Turn ON Display)............................... 5-15 n* (Repeat Function n Times) ........................................................... 5-16 $ (Execute Indirect File).................................................................... 5-16 Print (Display the ASCII String) ....................................................... 5-17 Buffer (Set Buffer Display M
Resumo do conteúdo contido na página número 9
Contents Parallel Polling................................................................................................. 7-10 Implementing a Parallel Poll ............................................................. 7-10 Parallel Polling with NI-488 Functions .............................. 7-10 Parallel Polling with NI-488.2 Routines............................. 7-12 Chapter 8 wibconf–Windows Interface Bus Configuration Utility......................... 8-1 Overview............................
Resumo do conteúdo contido na página número 10
Contents Exiting wibconf ............................................................................................... 8-12 Checking for Errors ........................................................................... 8-13 wibconf Batch Mode........................................................................................ 8-13 Appendix A Status Word Conditions ...................................................................................... A-1 Appendix B Error Codes and Solutions
Resumo do conteúdo contido na página número 11
Contents Tables Table 1-1. GPIB Handshake Lines ............................................................................... 1-3 Table 1-2. GPIB Interface Management Lines ............................................................. 1-3 Table 3-1. Status Word (ibsta) Layout .......................................................................... 3-4 Table 4-1. GPIB Error Codes ........................................................................................ 4-5 Table 5-1. Synta
Resumo do conteúdo contido na página número 12
About This Manual This manual describes the features and functions of the NI-488.2 software for Windows. The NI-488.2 software is meant to be used with Microsoft Windows version 3.0 or higher. This manual assumes that you are already familiar with Windows. How to Use This Manual Set Getting Started Manual Installation and Configuration Experienced
Resumo do conteúdo contido na página número 13
About This Manual Organization of This Manual This manual is organized as follows: • Chapter 1, Introduction, gives an overview of GPIB and the NI-488.2 software. • Chapter 2, Application Examples, contains nine sample applications designed to illustrate specific GPIB concepts and techniques that can help you write your own applications. The description of each example includes the programmer's task, a program flowchart, and numbered steps which correspond to the numbered blocks on the flowchar
Resumo do conteúdo contido na página número 14
About This Manual Conventions Used in This Manual The following conventions are used in this manual. bold Text in bold denotes windows, menus, menu options, and dialog box options. bold italic Bold italic text denotes a note, caution, or warning. italic Italic text denotes emphasis, cross references, field names, or an introduction to a key concept. monospace Text in this font denotes text or characters that you enter from the keyboard. Sections of code, programming examples, and syntax example
Resumo do conteúdo contido na página número 15
About This Manual 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 • Microsoft Windows User’s Guide Customer Communication National Instruments wants to receive your comments on our products and manuals. We are interested in the applicatio
Resumo do conteúdo contido na página número 16
Chapter 1 Introduction This chapter gives an overview of GPIB and the NI-488.2 software. GPIB Overview The ANSI/IEEE Standard 488.1-1987, also known as GPIB (General Purpose Interface Bus), describes a standard interface for communication between instruments and controllers from various vendors. It contains information about electrical, mechanical,
Resumo do conteúdo contido na página número 17
Introduction Chapter 1 GPIB Addressing All GPIB devices and boards must be assigned a unique GPIB address. A GPIB address is made up of two parts: a primary address and an optional secondary address. The primary address is a number in the range 0 to 30. The GPIB Controller uses this address to form a talk or listen address that is sent over the GPIB when communicating with a device. A talk address is formed by setting bit 6, the TA (Talk Active) bit of the GPIB address. A listen address is for
Resumo do conteúdo contido na página número 18
Chapter 1 Introduction Handshake Lines Three hardware handshake lines asynchronously control the transfer of message bytes between devices. This process is a three-wire interlocked handshake, and it guarantees that devices send and receive message bytes on the data lines without transmission error. Table 1-1 summarizes the GPIB handshake lines. Table 1-1. GPIB Handshake Lines Line Description NRFD (not ready for data) Listening device is ready/not ready to receive a message byte. Also used by
Resumo do conteúdo contido na página número 19
Introduction Chapter 1 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. Figure 1-2 shows the linear and star configurations. Linear Device A Configuration Device B Device C Star Configuration Device D Device A Device B Device C Figure 1-2.
Resumo do conteúdo contido na página número 20
Chapter 1 Introduction Controlling More Than One Board Multiboard drivers, such as the NI-488.2 driver for Windows, can control more than one interface board. Figure 1-3 shows an example of a multiboard system configuration. gpib0 is the access board for the voltmeter, and gpib1 is the access board for the plotter and printer. The control functions of the devices automatically access their respective boards. One GPIB Digital Voltmeter gpib0 Plotter Another gpib1 GPIB Printer Figure 1-3. Examp