Page 3 - Important Information
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 and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. Nati...
Page 4 - Contents; About This Manual
© National Instruments Corporation v NI-488.2 User Manual for Windows Contents About This Manual Using the NI-488.2 Documentation ............................................................................... xi Accessing the NI-488.2 Online Help........................................................
Page 8 - Glossary
Contents © National Instruments Corporation ix NI-488.2 User Manual for Windows Appendix EWindows 2000/NT: Common Questions Appendix FTechnical Support Resources Glossary Index Figures Figure 1-1. Linear and Star System Configuration .................................................. 1-1 Figure 1-2....
Page 11 - Conventions; Related Documentation
About This Manual NI-488.2 User Manual for Windows xii www.natinst.com 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...
Page 12 - Introduction; Setting up and Configuring Your System
© National Instruments Corporation 1-1 NI-488.2 User Manual for Windows 1 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 re...
Page 13 - Controlling More Than One Interface; Configuration Requirements
Chapter 1 Introduction NI-488.2 User Manual for Windows 1-2 www.natinst.com Controlling More Than One Interface Figure 1-2 shows an example of a multiboard system configuration. gpib0 is the access interface for the voltmeter, and gpib1 is the access interface for the plotter and printer. The contro...
Page 15 - Overview
© National Instruments Corporation 2-1 NI-488.2 User Manual for Windows 2 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»Pr...
Page 16 - Starting Measurement & Automation Explorer
Chapter 2 Measurement & Automation Explorer NI-488.2 User Manual for Windows 2-2 www.natinst.com Starting Measurement & Automation Explorer To start Measurement & Automation Explorer, select Start»Programs»National Instruments NI-488.2»Explore GPIB. Figure 2-1 shows Measurement & Aut...
Page 18 - Add a New GPIB Interface
Chapter 2 Measurement & Automation Explorer NI-488.2 User Manual for Windows 2-4 www.natinst.com 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 Mea...
Page 19 - Delete a GPIB Interface; Scan for GPIB Instruments
Chapter 2 Measurement & Automation Explorer © National Instruments Corporation 2-5 NI-488.2 User Manual for Windows 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 y...
Page 20 - Instruments Not Found; Communicate with Your Instrument
Chapter 2 Measurement & Automation Explorer NI-488.2 User Manual for Windows 2-6 www.natinst.com Instruments Not Found If the Instruments not Found message appears in the right window pane, Measurement & Automation Explorer did not find any instruments. To solve this problem, make sure that ...
Page 21 - Advanced Communication
Chapter 2 Measurement & Automation Explorer © National Instruments Corporation 2-7 NI-488.2 User Manual for Windows 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 ...
Page 23 - View or Change GPIB Interface Settings
Chapter 2 Measurement & Automation Explorer © National Instruments Corporation 2-9 NI-488.2 User Manual for Windows NI Spy records and displays all NI-488.2 calls, as shown in Figure 2-5. Figure 2-5. NI-488.2 Calls Recorded by NI Spy For more information about using NI Spy, select Help»Help Topi...
Page 25 - View GPIB Instrument Information
Chapter 2 Measurement & Automation Explorer © National Instruments Corporation 2-11 NI-488.2 User Manual for Windows 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. GPIB Configur...
Page 26 - Change GPIB Device Templates
Chapter 2 Measurement & Automation Explorer NI-488.2 User Manual for Windows 2-12 www.natinst.com instrument information that Measurement & Automation Explorer displays. Change GPIB Device Templates For older NI-488.2 applications, you might need to modify one of the device templates to find...
Page 28 - Access Additional Help and Resources
Chapter 2 Measurement & Automation Explorer NI-488.2 User Manual for Windows 2-14 www.natinst.com 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 disabl...
Page 29 - National Instruments GPIB Web Site
Chapter 2 Measurement & Automation Explorer © National Instruments Corporation 2-15 NI-488.2 User Manual for Windows 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...
Page 30 - Update GPIB-ENET Firmware
Chapter 2 Measurement & Automation Explorer NI-488.2 User Manual for Windows 2-16 www.natinst.com 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 appear...
Page 31 - Simple Instrument Control
© National Instruments Corporation 3-1 NI-488.2 User Manual for Windows 3 Developing Your NI-488.2 Application This chapter describes how to develop an NI-488.2 application using the NI-488.2 API. Simple Instrument Control To establish basic communication with your instrument, use the NI-488.2 Commu...
Page 32 - Interactive Instrument Control
Chapter 3 Developing Your NI-488.2 Application NI-488.2 User Manual for Windows 3-2 www.natinst.com The NI-488.2 Communicator dialog box appears, as shown in Figure 3-1. Figure 3-1. NI-488.2 Communicator 6. Type a command in the Send String field and do one of the following: • To write a command to ...
Page 33 - Choosing Your Programming Methodology; Choosing a Method to Access the NI-488.2 Driver; Direct Entry Access
Chapter 3 Developing Your NI-488.2 Application © National Instruments Corporation 3-3 NI-488.2 User Manual for Windows 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...
Page 34 - Communicating with a Single GPIB Device
Chapter 3 Developing Your NI-488.2 Application NI-488.2 User Manual for Windows 3-4 www.natinst.com Choosing How to Use the NI-488.2 API The NI-488.2 API has two subsets of calls to meet your application needs. Both of these sets, the traditional calls and the multi-device calls, are compatible acro...
Page 35 - Using Multiple Interfaces and/or Multiple Devices; Checking Status with Global Variables
Chapter 3 Developing Your NI-488.2 Application © National Instruments Corporation 3-5 NI-488.2 User Manual for Windows Board-level functions that an NI-488.2 application might use include the following— ibcmd , ibrd , ibwrt , and ibconfig . For a detailed list, refer to the NI-488.2 online help. For...
Page 37 - Using Interactive Control to Communicate with Devices
Chapter 3 Developing Your NI-488.2 Application © National Instruments Corporation 3-7 NI-488.2 User Manual for Windows The language header file defines each of the ibsta status bits. You can test for an ibsta status bit being set using the bitwise and operator ( & in C/C++). For example, the ibs...
Page 38 - Programming Models; Applications That Communicate with a Single GPIB Device; Initialization
Chapter 3 Developing Your NI-488.2 Application NI-488.2 User Manual for Windows 3-8 www.natinst.com Programming Models Applications That Communicate with a Single GPIB Device This section describes items you should include in your application and provides general program steps with an NI-488.2 examp...
Page 39 - Device Communication; Cleanup
Chapter 3 Developing Your NI-488.2 Application © National Instruments Corporation 3-9 NI-488.2 User Manual for Windows GPIB address of your GPIB device, as described in Step 2. Determine the GPIB Address of Your Device in the section Applications That Use Multiple Interfaces or Communicate with Mult...
Page 40 - Items to Include
Chapter 3 Developing Your NI-488.2 Application NI-488.2 User Manual for Windows 3-10 www.natinst.com Applications That Use Multiple Interfaces or Communicate with Multiple GPIB Devices This section describes items you should include in your application and provides general program steps with an NI-4...
Page 42 - Language-Specific Programming Instructions
Chapter 3 Developing Your NI-488.2 Application NI-488.2 User Manual for Windows 3-12 www.natinst.com Step 4a. Use SendList to send the "*IDN?" query command to multiple GPIB devices. The address is the list of GPIB devices to be queried. The buffer that you pass to SendList is the command me...
Page 43 - Direct Entry with C
Chapter 3 Developing Your NI-488.2 Application © National Instruments Corporation 3-13 NI-488.2 User Manual for Windows Visual Basic (Version 4.0 or Later) With Visual Basic, you can access the traditional NI-488.2 calls as subroutines, using the BASIC keyword CALL followed by the traditional NI-488...
Page 44 - Directly Accessing the gpib-32.dll Exports
Chapter 3 Developing Your NI-488.2 Application NI-488.2 User Manual for Windows 3-14 www.natinst.com support 16-bit wide characters, use only the 8-bit ASCII versions, named ibbnaA , ibfindA , ibrdfA , and ibwrtfA . The Unicode versions are named ibbnaW , ibfindW , ibrdfW , and ibwrtfW . You can use...
Page 47 - Running Existing Win32 and Win16 NI-488.2 Applications
Chapter 3 Developing Your NI-488.2 Application © National Instruments Corporation 3-17 NI-488.2 User Manual for Windows Running Existing NI-488.2 Applications Running Existing Win32 and Win16 NI-488.2 Applications The NI-488.2 software includes the necessary components to allow existing Win32 and Wi...
Page 48 - Running Existing DOS NI-488.2 Applications under Windows 2000/NT
Chapter 3 Developing Your NI-488.2 Application NI-488.2 User Manual for Windows 3-18 www.natinst.com Running Existing DOS NI-488.2 Applications under Windows 2000/NT To run DOS NI-488.2 applications, you must enable NI-488.2 DOS support under Windows 2000/NT. To enable NI-488.2 DOS support in Window...
Page 49 - Debugging Your Application; NI Spy
© National Instruments Corporation 4-1 NI-488.2 User Manual for Windows 4 Debugging Your Application This chapter describes several ways to debug your application. NI Spy The NI Spy utility monitors NI-488.2 API calls made by NI-488.2 applications. It records NI-488.2 API input and output values fro...
Page 50 - Global Status Variables
Chapter 4 Debugging Your Application NI-488.2 User Manual for Windows 4-2 www.natinst.com NI Spy records and displays all NI-488.2 calls, as shown in Figure 4-1. Figure 4-1. NI-488.2 Calls Recorded by NI Spy For more information about using NI Spy, select Help»Help Topics in NI Spy or refer to Chapt...
Page 51 - Existing Applications
Chapter 4 Debugging Your Application © National Instruments Corporation 4-3 NI-488.2 User Manual for Windows Existing Applications If the application does not have built-in error detection handling, you can use NI Spy to determine which NI-488.2 call is failing. To start NI Spy, refer to the NI Spy ...
Page 52 - Timing Errors
Chapter 4 Debugging Your Application NI-488.2 User Manual for Windows 4-4 www.natinst.com Timing Errors If your application fails, but the same calls issued interactively in the Interactive Control utility are successful, your program might be issuing the NI-488.2 calls too quickly for your device t...
Page 53 - Communication Errors; Repeat Addressing; Termination Method; Other Errors
Chapter 4 Debugging Your Application © National Instruments Corporation 4-5 NI-488.2 User Manual for Windows Communication Errors The following sections describe communication errors you might encounter in your application. Repeat Addressing Devices adhering to the IEEE 488.2 standard should remain ...
Page 55 - Using the NI Spy Online Help
Chapter 5 NI Spy Utility NI-488.2 User Manual for Windows 5-2 www.natinst.com NI Spy records and displays all NI-488.2 calls, as shown in Figure 5-1. Figure 5-1. NI-488.2 Calls Recorded by NI Spy Using the NI Spy Online Help To view the built-in, context-sensitive online help for the NI Spy utility,...
Page 56 - Exiting NI Spy; Performance Considerations
Chapter 5 NI Spy Utility © National Instruments Corporation 5-3 NI-488.2 User Manual for Windows Exiting NI Spy When you exit NI Spy, its current configuration is saved and used to configure NI Spy when you start it again. Unless you save the data captured in NI Spy before you exit, that information...
Page 57 - Getting Started with Interactive Control
© National Instruments Corporation 6-1 NI-488.2 User Manual for Windows 6 Interactive Control Utility This chapter introduces you to the Interactive Control utility, which lets you communicate with GPIB devices interactively. Overview With the Interactive Control utility, you communicate with the GP...
Page 60 - Interactive Control Syntax; Number Syntax; String Syntax
Chapter 6 Interactive Control Utility NI-488.2 User Manual for Windows 6-4 www.natinst.com The ibonl command properly closes the device handle and the ud0 prompt is no longer available. 9. To exit Interactive Control, type q . Interactive Control Syntax The following special rules apply to making ca...
Page 61 - Address Syntax; Interactive Control Commands
Chapter 6 Interactive Control Utility © National Instruments Corporation 6-5 NI-488.2 User Manual for Windows Special symbols—Some instruments require special termination or end-of-string (EOS) characters that indicate to the device that a transmission has ended. The two most common EOS characters a...
Page 66 - Error Information
Chapter 6 Interactive Control Utility NI-488.2 User Manual for Windows 6-10 www.natinst.com Status Word In the Interactive Control utility, all NI-488.2 calls (except ibfind and ibdev ) return the status word ibsta in two forms: a hex value in square brackets and a list of mnemonics in parentheses. ...
Page 67 - Count Information
Chapter 6 Interactive Control Utility © National Instruments Corporation 6-11 NI-488.2 User Manual for Windows In this example, the addressing command bytes could not be transmitted to the device. This indicates that either the GPIB device is powered off or the GPIB cable is disconnected. For a deta...
Page 68 - Termination of Data Transfers
© National Instruments Corporation 7-1 NI-488.2 User Manual for Windows 7 NI-488.2 Programming Techniques This chapter describes techniques for using some NI-488.2 calls in your application. For more information about each function, refer to the NI-488.2 online help. For instructions on accessing th...
Page 70 - System Configuration Effects on HS488
Chapter 7 NI-488.2 Programming Techniques © National Instruments Corporation 7-3 NI-488.2 User Manual for Windows If you are using device-level calls, the NI-488.2 software automatically sends the HS488 configuration message to devices. If you enabled the HS488 protocol in the NI-488.2 Configuration...
Page 71 - Waiting for GPIB Conditions; Calling the ibnotify Function
Chapter 7 NI-488.2 Programming Techniques NI-488.2 User Manual for Windows 7-4 www.natinst.com Waiting for GPIB Conditions You can use the ibwait function to obtain the current ibsta value or to suspend your application until a specified condition occurs on the GPIB. If you use ibwait with a paramet...
Page 72 - ibnotify Programming Example
Chapter 7 NI-488.2 Programming Techniques © National Instruments Corporation 7-5 NI-488.2 User Manual for Windows GPIB device to request service, you might choose to pass ibnotify a mask with RQS (for device-level) or SRQI (for board-level). The callback function that you register with the ibnotify ...
Page 76 - Writing Multithreaded Win32 NI-488.2 Applications
Chapter 7 NI-488.2 Programming Techniques © National Instruments Corporation 7-9 NI-488.2 User Manual for Windows return 0; } else { return RQS; } } } Writing Multithreaded Win32 NI-488.2 Applications If you are writing a multithreaded NI-488.2 application and you plan to make all of your NI-488.2 c...
Page 78 - Device-Level Calls and Bus Management; Talker/Listener Applications
Chapter 7 NI-488.2 Programming Techniques © National Instruments Corporation 7-11 NI-488.2 User Manual for Windows Device-Level Calls and Bus Management The device-level traditional NI-488.2 calls are designed to perform all of the GPIB management for your application. However, the NI-488.2 driver c...
Page 79 - Serial Polling; Service Requests from IEEE 488 Devices
Chapter 7 NI-488.2 Programming Techniques NI-488.2 User Manual for Windows 7-12 www.natinst.com the application could monitor the status bits TACS (Talker Active State) and LACS (Listener Active State) to determine when to send data to or receive data from the Controller. The application could also ...
Page 80 - Automatic Serial Polling
Chapter 7 NI-488.2 Programming Techniques © National Instruments Corporation 7-13 NI-488.2 User Manual for Windows Automatic Serial Polling You can enable automatic serial polling if you want your application to conduct a serial poll automatically when the SRQ line is asserted. The autopolling proce...
Page 81 - Autopolling and Interrupts
Chapter 7 NI-488.2 Programming Techniques NI-488.2 User Manual for Windows 7-14 www.natinst.com Autopolling and Interrupts If autopolling and interrupts are both enabled, the NI-488.2 software can perform autopolling after any device-level NI-488.2 call provided that no GPIB I/O is currently in prog...
Page 83 - Example 1: Using FindRQS; Example 2: Using AllSpoll
Chapter 7 NI-488.2 Programming Techniques NI-488.2 User Manual for Windows 7-16 www.natinst.com Example 1: Using FindRQS This example shows you how to use FindRQS to find the first device that is requesting service: void GetASerialPollResponse ( char *DevicePad, char *DeviceResponse ) { char SerialP...
Page 84 - Parallel Polling; Implementing a Parallel Poll
Chapter 7 NI-488.2 Programming Techniques © National Instruments Corporation 7-17 NI-488.2 User Manual for Windows return; } Parallel Polling Although parallel polling is not widely used, it is a useful method for obtaining the status of more than one device at the same time. The advantage of parall...
Page 87 - Controller-In-Charge and System Controller
© National Instruments Corporation A-1 NI-488.2 User Manual for Windows A GPIB Basics The ANSI/IEEE Standard 488.1-1987, also known as General Purpose Interface Bus (GPIB), describes a standard interface for communication between instruments and controllers from various vendors. It contains informat...
Page 88 - GPIB Addressing; Sending Messages across the GPIB; Data Lines
Appendix A GPIB Basics NI-488.2 User Manual for Windows A-2 www.natinst.com GPIB Addressing All GPIB devices and interfaces 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 rang...
Page 89 - Handshake Lines
Appendix A GPIB Basics © National Instruments Corporation A-3 NI-488.2 User Manual for Windows 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 ...
Page 90 - Status Word Conditions
© National Instruments Corporation B-1 NI-488.2 User Manual for Windows B Status Word Conditions This appendix gives a detailed description of the conditions reported in the status word, ibsta . For information about how to use ibsta in your application program, refer to the NI-488.2 online help. Fo...
Page 96 - Solutions
Appendix C Error Codes and Solutions NI-488.2 User Manual for Windows C-2 www.natinst.com EDVR (0) EDVR is returned when the interface or device name passed to ibfind , or the interface index passed to ibdev , cannot be accessed. The global variable ibcntl contains an error code. This error occurs w...
Page 104 - Troubleshooting EDVR Error Conditions
© National Instruments Corporation D-1 NI-488.2 User Manual for Windows D Windows 98/95: Troubleshooting and Common Questions This appendix describes how to troubleshoot problems and answers some common questions about the NI-488.2 software for Windows 98/95. Troubleshooting EDVR Error Conditions In...
Page 106 - Troubleshooting Device Manager Problems
Appendix D Windows 98/95: Troubleshooting and Common Questions © National Instruments Corporation D-3 NI-488.2 User Manual for Windows Troubleshooting Device Manager Problems If you are having trouble with your GPIB interface, use the Windows Device Manager to troubleshoot your problems. To do so, c...
Page 107 - Step 1. Free up an Interrupt Resource
Appendix D Windows 98/95: Troubleshooting and Common Questions NI-488.2 User Manual for Windows D-4 www.natinst.com Enabling Interrupts In Windows 98/95, you can use your GPIB interface without interrupts, but the NI-488.2 software performance is significantly slower without interrupts. For example,...
Page 108 - Step 2. Remove Your GPIB Interface from the Device Manager; Common Questions
Appendix D Windows 98/95: Troubleshooting and Common Questions © National Instruments Corporation D-5 NI-488.2 User Manual for Windows 7. Click on the OK button to save your changes. On the Device Manager tab, the disabled device has a red X overlaid on it. The red X indicates that the device is dis...
Page 115 - Technical Support Resources; NI Web Support; Online Problem-Solving and Diagnostic Resources
© National Instruments Corporation F-1 NI-488.2 User Manual for Windows F Technical Support Resources This appendix describes the comprehensive resources available to you in the Technical Support section of the National Instruments Web site and provides technical support telephone numbers for you to...
Page 116 - Software-Related Resources; Worldwide Support
Appendix F Technical Support Resources NI-488.2 User Manual for Windows F-2 www.natinst.com Software-Related Resources • Instrument Driver Network—A library with hundreds of instrument drivers for control of standalone instruments via GPIB, VXI, or serial interfaces. You also can submit a request fo...
Page 125 - Index
© National Instruments Corporation I-1 NI-488.2 User Manual for Windows Index Numbers/Symbols ! (repeat previous function) function, Interactive Control utility, 6-9 $ filename (execute indirect file) function, Interactive Control utility, 6-10 + (turn ON display) function, Interactive Control utili...