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.
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...
Page 5
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...
Page 7
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 ...
Page 8
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 Figure 3-1.
Page 9
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.
The following documents contain information that you may find helpful as you read this manual: • • NI-488.2 User Manual for Windows 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...
The following restrictions are typical: • • • NI-488.2 User Manual for Windows gpib0 gpib1 Printer Figure 1-2. Example of Multiboard System Configuration A maximum separation of 4 m between any two devices and an average separation of 2 m over the entire bus.
Page 14
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. Chapter 1 Introduction NI-488.2 User Manual for Windows...
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.
Automation Explorer, complete the following steps: NI-488.2 User Manual for Windows Figure 2-1. Measurement & Automation Explorer 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: Insert the NI-488.2 for Windows CD.
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.
In the right window pane, double-click on the Add Device or Interface icon. The Insert New dialog box appears. 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. www.natinst.com...
GPIB instrument. Most instruments respond to the *IDN? Basic Communication (Query/Write/Read) To establish basic communication with your instrument, use the NI-488.2 Communicator, as follows: NI-488.2 User Manual for Windows Instruments not Found Instruments.
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 Type a command in the Send String field and do one of the following: •...
To view the online help for Interactive Control, type Control command prompt. View NI-488.2 Software Version To view the NI-488.2 software version, complete the following steps: Monitor, Record, and Display NI-488.2 Calls To monitor NI-488.2 calls, use NI Spy, as follows: NI-488.2 User Manual for Windows...
Windows 2000/NT To view or change GPIB interface information, complete the following steps: NI-488.2 User Manual for Windows 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...
Expand the Devices and Interfaces directory by clicking on the + next to the folder. Select your GPIB interface. Measurement & Automation Explorer displays the connected instruments in the right window pane. Table 2-1 describes the 2-11 Measurement & Automation Explorer section earlier in this NI-488.2 User Manual for Windows...
Measurement & Automation Explorer Name Type Value Description Change GPIB Device Templates For older NI-488.2 applications, you might need to modify one of the device templates to find a given GPIB instrument by name, for example, ibfind("fluke45") preferred ibfind ibdev eliminates unneccessary device name requirements.
Click on the Configure button and rename the device template as described in your application documentation. Click on the OK button twice to save your changes and exit. Make sure that no older version of the NI-488.2 DOS device driver is being loaded from your config.sys...
To disable DOS support, add 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...
Explorer, as follows: To view the built-in, context-sensitive help for the Update Firmware utility, click on the Help button. NI-488.2 User Manual for Windows Expand the Devices and Interfaces directory by clicking on the + next to the folder. Right-click on your GPIB-ENET interface and select Advanced IP Settings from the drop-down menu that appears.
Show Sample button. Interactive Instrument Control Before you write your NI-488.2 application, you might want to use the Interactive Control utility to communicate with your instruments interactively by typing individual commands rather than issuing them from an application.
Choosing Your Programming Methodology Based on your development environment, you can select a method for accessing the driver, and based on your NI-488.2 programming needs, you can choose how to use the NI-488.2 API. Choosing a Method to Access the NI-488.2 Driver Applications can access the NI-488.2 dynamic link library (DLL),...
Developing Your NI-488.2 Application 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 across computer platforms and operating systems, so you can port programs to other platforms with little or no source code modification.
NI-488.2 calls to have access to all the NI-488.2 functionality. Checking Status with Global Variables Each NI-488.2 API call updates four global variables to reflect the status of the device or interface that you are using. These global status variables are...
A bit value of zero (0) indicates that the condition is not in effect. Each bit in NI-488.2 calls (dev), board-level traditional NI-488.2 calls and multi-device NI-488.2 calls (brd), or all (dev, brd). Table 3-1 shows the condition that each bit position represents, the bit mnemonics, and the type of calls for which the bit can be set.
The language header file defines each of the for an C/C++). For example, the To check for an NI-488.2 error, use the following statement after each NI-488.2 call: if (ibsta & ERR) Error Variable (iberr) If the ERR bit is set in error occurs, the error type is specified by error, use the following statement after each NI-488.2 call:...
. The standard Windows header file, decl-32.h contains definitions used by decl-32.h prototypes for the NI-488.2 calls and constants that you can use in your application. Error checking—Check for errors after each NI-488.2 call. Error handling—Declare and define a function to handle NI-488.2 errors.
Page 39
• • • • A successful device-level traditional NI-488.2 calls that communicate with the GPIB instrument. Step 2. Clear the Device the default state. Device Communication Step 3. Communicate with the Device Communicate with the device by sending it the reading back the response.
. The standard Windows header file, decl-32.h contains definitions used by decl-32.h prototypes for the NI-488.2 calls and constants that you can use in your application. Error checking—Check for errors after each NI-488.2 call. Error handling—Declare and define a function to handle NI-488.2 errors.
Page 41
Alternately, if you already know your GPIB device’s primary and secondary address, you can create an appropriate GPIB address to use in subsequent NI-488.2 calls, as follows: a GPIB address is a 16-bit value that contains the primary address in the low byte and the secondary address in the high byte.
Step 5. Place the Interface Offline before Exiting Your Application Language-Specific Programming Instructions The following sections describe how to develop, compile, and link your Win32 NI-488.2 applications using various programming languages. Microsoft Visual C/C++ (Version 2.0 or Later) Before you compile your Win32 C application, make sure that the following lines are included at the beginning of your program: #include <windows.h>...
For more information about function syntax for Visual Basic, refer to the NI-488.2 online help. For instructions on accessing the online help, refer to the...
, you must define the direct entry prototypes for the , refer to the NI-488.2 online help. For gpib-32.dll section in About This . For more information about direct entry, refer to the gpib-32.dll exports. The following code fragment shows gpib-32.dll...
Page 45
For the prototypes for each function, refer to the NI-488.2 online help. For instructions on accessing the online help, refer to the Documentation For functions that return an integer value, like to the function needs to be cast as follows:...
Page 46
FreeLibrary(Gpib32Lib); For more examples of directly accessing entry sample programs with the NI-488.2 software. For more information about direct entry, refer to the online help for your development environment. NI-488.2 User Manual for Windows (LPCSTR)"user_ibcnt"); (int, int, int, int, int, int)) GetProcAddress(Gpib32Lib, (LPCSTR)"ibdev");...
Chapter 3 Developing Your NI-488.2 Application 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 Windows 2000/NT, complete the following steps: To disable DOS support, add NI-488.2 User Manual for Windows...
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 from all Win32, Win16, and DOS NI-488.2 applications.
If a NI-488.2 call failed, the high bit of failed NI-488.2 call, error cases, the value in You can use NI Spy to determine which NI-488.2 call is failing. Once you know which NI-488.2 call fails, refer to Appendix B, Conditions, and Appendix C, understanding why the NI-488.2 call failed.
To start NI Spy, refer to the After you have an NI Spy capture file, you can use NI Spy to search for failed NI-488.2 calls by searching for calls with the ERR bit set. Once you know which NI-488.2 call fails, refer to Appendix B, Conditions, and Appendix C, understanding why the NI-488.2 call failed.
NI-488.2 call. One way to do this is to have your device communicate its status whenever possible. Although this method is not possible with many devices, it is usually the best option.
You should be aware of the data termination method that your device uses. By default, your NI-488.2 software is configured to send EOI on writes and terminate reads on EOI or a specific byte count. If you send a command string to your device and it does not respond, it might not be recognizing the end of the command.
Overview NI Spy monitors, records, and displays the NI-488.2 calls made from Win32, Win16, and DOS NI-488.2 applications. It is a useful tool for troubleshooting errors in your application and for verifying that the communication with your GPIB instrument is correct.
Locating Errors with NI Spy All NI-488.2 calls returned with an error are displayed in red within the main NI Spy window. Viewing Properties for Recorded Calls To see the detailed properties of any call recorded in the main NI Spy window, double-click on the call.
File»Exit to exit the NI Spy utility. Performance Considerations NI Spy can slow down the performance of your NI-488.2 application, and certain configurations of NI Spy have a larger impact on performance than others. For example, configuring NI Spy to record calls to an output file or to use full buffers might have a significant impact on the performance of both your application and your system.
Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer. Expand the Devices and Interfaces directory by clicking on the + next to the folder. ) in hexadecimal notation. ibsta. ) if an error exists iberr NI-488.2 User Manual for Windows...
The instrument shown in Figure 6-1 has a primary address of and no secondary address. NI-488.2 User Manual for Windows Right-click on your GPIB interface and select Interactive Control from the drop-down menu that appears.
ASCII character sequence—You must enclose the entire sequence in quotation marks. Hex byte—You must use a backslash character and an hex value. For example, hex 40 is represented by NI-488.2 User Manual for Windows command properly closes the device handle and the ibonl prompt is no longer available.
Address Syntax Some of the NI-488.2 calls have an address or address list parameter. An address is a 16-bit representation of the GPIB device address. The primary address is stored in the low byte and the secondary address, if any, is stored in the high byte.
Page 62
Chapter 6 Interactive Control Utility Table 6-1. Syntax for Device-Level Traditional NI-488.2 Calls in Interactive Control (Continued) Syntax Change/disable EOS message ibeos v Enable/disable END message ibeot v Check for presence of device on the GPIB at ibln pad sad...
Table 6-2. Syntax for Board-Level Traditional NI-488.2 Calls in Interactive Control Syntax Return configuration information where ibask option a configuration parameter Become active Controller ibcac v Send commands ibcmd cmdbuf Send commands asynchronously ibcmda cmdbuf Alter configurable parameters where ibconfig option...
Chapter 6 Interactive Control Utility Table 6-2. Syntax for Board-Level Traditional NI-488.2 Calls in Interactive Control (Continued) Syntax Send interface clear ibsic Set/clear remote enable line ibsre v Abort asynchronous operation ibstop Change/disable time limit ibtmo v Wait for selected event where...
For more information about NI-488.2 Error Information If an NI-488.2 call completes with an error, the Interactive Control utility displays the relevant error mnemonic. In the following example, an error condition EBUS has occurred during a data transfer: ud0: ibwrt "*IDN?"...
Interactive Control utility displays the index of the invalid address as the count. The count has a different meaning depending on which NI-488.2 call is made. For the correct interpretation of the count return, refer to the function descriptions in the NI-488.2 online help.
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 the online help, refer to the NI-488.2 Documentation Termination of Data Transfers...
High-Speed Data Transfers (HS488) National Instruments has designed a high-speed data transfer protocol for IEEE 488 called HS488. This protocol increases performance for GPIB reads and writes up to 8 Mbytes/s, depending on your system.
HS488 configuration message when you use to bring a device online. If you call length, the NI-488.2 software sends out the HS488 message again, the next time you call a device-level function. If you are using board-level traditional NI-488.2 calls or multi-device NI-488.2 calls and you want to configure devices for high-speed, you must...
GPIB device. Then, when your GPIB device requests service, the NI-488.2 driver automatically notifies your application that the event has occurred by invoking a callback function. The callback function is registered with the NI-488.2 driver when Calling the ibnotify Function ibnotify...
GPIB device to request service, you might choose to pass mask The callback function that you register with the by the NI-488.2 driver when one or more of the mask bits passed to ibnotify int __stdcall Callback ( The callback function is passed a unit descriptor, the current values of the NI-488.2 global variables, and the user-defined reference data that was...
Page 73
("unable to write to device.\n"); return 0; // set up the asynchronous event notification on RQS ibnotify (ud, RQS, MyCallback, NULL); NI-488.2 User Manual for Windows long LocalIbcntl, void *RefData); (0,// connect board // primary address of GPIB device...
Page 75
// Issue a request to the device to send the data and rearm // callback on RQS. LocalIbsta = ibwrt (LocalUd, "SEND DATA", 9L); if (LocalIbsta & ERR) NI-488.2 User Manual for Windows SpollByte); printf ("ibwrt failed. No more callbacks.\n"); DeviceError = TRUE;...
Thread #2 proceeds to make several NI-488.2 calls that automatically update the NI-488.2 globals. Later, when thread #1 is allowed to run, the NI-488.2 global that it is ready to examine is no longer in a known state and its value is no longer reliable.
Page 77
If you are using Notification in Win32 NI-488.2 Applications callback is executed in a separate thread that is created by the NI-488.2 driver. Therefore, if your application makes NI-488.2 calls from the NI-488.2 calls from other places, you must use the...
• • If the current CIC does not pass control, the NI-488.2 driver returns the ECIC error code to your application. This error can occur if the current CIC does not understand the CIC protocol. If this happens, you could send a device-specific command requesting control for the GPIB interface.
IEEE 488.2 events occurs. These events include power-on, user request, command error, execution error, device dependent error, query error, request control, and operation complete. The device can assert SRQ when ESB or MAV are set, or when a manufacturer-defined condition occurs. NI-488.2 User Manual for Windows 7-12 www.natinst.com...
NI-488.2 call provided that no GPIB I/O is currently in progress. In this case, an automatic serial poll can occur even when your application is not making any calls to the NI-488.2 software. Autopolling can also occur when a device-level is in progress.
Then, you must check the RQS bit of each status byte to determine whether that device requested service. is similar to ReadStatusByte polls a single device. It is also similar to the device-level NI-488.2 function. ibrsp serial polls a list of devices until it finds a device that is FindRQS requesting service or until it has polled all of the devices on the list.
Example 2: Using AllSpoll This example shows you how to use with a single call: void GetAllSerialPollResponses ( Addr4882_t AddrList[], short ResponseList[] ) NI-488.2 User Manual for Windows char SerialPollResponse = 0; int WaitResult; Addr4882_t Addrlist[4] = {3,4,5,NOADDR}; WaitSRQ (0, &WaitResult);...
Implementing a Parallel Poll You can implement parallel polling with either the traditional or multi-device NI-488.2 calls. If you use multi-device NI-488.2 calls to execute parallel polls, you do not need extensive knowledge of the parallel polling messages. However, you should use the traditional NI-488.2 calls...
Page 85
NI-488.2 Programming Techniques NI-488.2 User Manual for Windows The following example code configures a device for parallel polling using traditional NI-488.2 calls. The device asserts DIO7 if its is 0. In this example, the command opens a device that has a primary...
Page 87
Some devices are capable of playing more than one role. A digital voltmeter, for example, can be a Talker and a Listener. If your system has a National Instruments GPIB interface and software installed, it can function as a Talker, Listener, and Controller.
16 signal lines and 8 ground return (shield drain) lines. The 16 signal lines are discussed in the following sections. Data Lines Eight data lines, DIO1 through DIO8, carry both data and command messages. NI-488.2 User Manual for Windows GPIB Primary Address Figure A-1. GPIB Address Bits (range 0–30) www.natinst.com...
Controller. Talker uses the EOI line to mark the end of a data message. Controller uses the EOI line when it conducts a parallel poll. Appendix A GPIB Basics Description Description NI-488.2 User Manual for Windows...
Status Word Conditions This appendix gives a detailed description of the conditions reported in the status word, For information about how to use to the NI-488.2 online help. For instructions on accessing the online help, refer to the Manual. Each bit in (dev, brd).
Page 91
EOS character by itself, END is not set. The application should check the last byte of the received buffer to see if it is the EOS character. NI-488.2 User Manual for Windows Error Codes and Solutions, describes error codes that are along with possible solutions.
Page 92
. You can also wait for a device to request service ibsta call is inoperative for that interface. LOK is EnableLocal ibloc Appendix B Status Word Conditions with a ibwait call on RQS for a device ibwait to acquire the serial poll ibrsp function. ibrsp NI-488.2 User Manual for Windows...
Page 93
Untalk (UNT) command, its own listen address, a talk address other than its own talk address, or Interface Clear (IFC). NI-488.2 User Manual for Windows When REN becomes unasserted. When the GPIB interface as a Listener detects that the Go to Local (GTL) command has been sent either by the GPIB interface or by another Controller.
Page 94
, and DCAS is set in ibwrt Send ibsta Appendix B Status Word Conditions function. ibgts ibgts ibwait mask parameter. after the next NI-488.2 ibsta , the I/O operation is ibsta after the next NI-488.2 call. NI-488.2 User Manual for Windows...
EOIP Asynchronous I/O in progress ECAP No capability for operation EFSO File system error EBUS GPIB bus error ESTB Serial poll status byte queue overflow ESRQ SRQ stuck in ON position ETAB Table problem Meaning NI-488.2 User Manual for Windows...
Page 96
Use only device or interface names that are configured in the NI-488.2 Configuration utility as parameters to the Use the NI-488.2 Troubleshooting Wizard to ensure that each interface you want to access is working properly, as follows: Select Start»Programs»National Instruments...
Page 98
A multi-device NI-488.2 call made with an invalid address. called with an invalid data line or sense bit. PPollConfig Make sure that the parameters passed to the NI-488.2 call are valid. Do not use a device descriptor in a board function or vice-versa. when the shadow-handshake...
Page 99
GPIB interface does not have System Controller capability. Solutions Give the GPIB interface System Controller capability by calling or by using the NI-488.2 Configuration utility to configure that capability into the software. EABO (6) EABO indicates that an I/O operation has been canceled, usually due to a timeout condition.
Page 100
I/O address by running the NI-488.2 Troubleshooting Wizard, as follows: EDMA (8) EDMA occurs if a system DMA error is encountered when the NI-488.2 software attempts to transfer data over the GPIB using DMA. Solutions Possible solutions for this error are as follows: •...
Page 101
Make sure that the access mode of the file is correct. Make sure there is enough room on the disk to hold the file. Appendix C Error Codes and Solutions contains CMPL, the driver and call encounters a problem NI-488.2 User Manual for Windows...
Page 102
Call more frequently to empty the queue. ibrsp Disable autopolling with the ibconfig ) or the NI-488.2 Configuration utility, as follows: IbcAUTOPOLL Select Start»Programs»National Instruments NI-488.2»Explore GPIB to start Measurement & Automation Explorer. Expand the Devices and Interfaces directory by clicking on the + next to the folder.
Page 103
, increase the size of result arrays. In the case of FindLstn , check to see if other devices not used by your application are Appendix C Error Codes and Solutions call with RQS set in ibwait functions. ETAB FindRQS NI-488.2 User Manual for Windows...
Page 104
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 some cases, NI-488.2 calls may return with the ERR bit set in the value EDVR in troubleshooting the error condition.
Page 105
EDVR Error Condition with ibcntl Set to 0xE0140035 (–535560139) If a call is made with a device name that is not listed in the logical device templates that are part of the NI-488.2 Configuration utility, an EDVR error condition occurs with EDVR Error Condition with ibcntl Set to 0xE0320029 (–533594071) or...
GPIB interface should show up without any problems. If the problem persists, contact National Instruments. Free up system resources by disabling other unnecessary hardware so that enough resources are available for the GPIB interface. Solution NI-488.2 User Manual for Windows...
Page 107
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, transfer sizes between 1 and 10 bytes transfer at a rate of only 2% of the transfer rate with enabled interrupts. As the transfer size increases, the performance degradation decreases slightly, but it remains a significant problem for all transfers under 1 Mbyte.
Page 108
GPIB Hardware and follow the instructions on the screen. Common Questions How do I get started? To get started with your GPIB hardware and the NI-488.2 software, use the NI-488.2 Getting Started Wizard. To do so, select Start»Programs» National Instruments NI-488.2»Getting Started Wizard.
Page 109
100 GPIB interfaces. How many devices can I configure for use with the NI-488.2 software? You can configure the NI-488.2 software to use up to 1,024 logical devices. The default number of devices is 32. The maximum number of physical devices you should connect to a single GPIB interface is 14, or fewer, depending on your system configuration.
Enabling Interrupts section earlier in this appendix. How can I determine if my GPIB hardware and the NI-488.2 software are installed properly? Run the NI-488.2 Troubleshooting Wizard. To do so, select Start» Programs»National Instruments NI-488.2»Explore GPIB. Then, select Help»Troubleshooting»NI-488.2 Troubleshooting Wizard.
Page 111
Windows 98/95: Troubleshooting and Common Questions How can I start communicating with my GPIB instrument? For simple instrument communication, use the NI-488.2 Communicator. For instructions on how to use the NI-488.2 Communicator, refer to the Basic Communication (Query/Write/Read) Measurement & Automation How do I check for errors in my NI-488.2 application?
Page 112
Windows 2000/NT. Common Questions How do I get started? To get started with your GPIB hardware and the NI-488.2 software, use the NI-488.2 Getting Started Wizard. To do so, select Start»Programs» National Instruments NI-488.2»Getting Started Wizard. How do I troubleshoot problems? Run the NI-488.2 Troubleshooting Wizard.
Page 113
GPIB interfaces. How many devices can I configure for use with the NI-488.2 software? You can configure the NI-488.2 software to use up to 100 logical devices. The default number of devices is 32. Are interrupts and DMA required with the NI-488.2 software? Interrupts are required, but DMA is not.
Page 114
Your Application. What information should I have before I call National Instruments? Before you call National Instruments, record the results of the NI-488.2 Troubleshooting Wizard. To start the NI-488.2 Troubleshooting Wizard, select Start»Programs»National Instruments NI-488.2»Explore GPIB. Then, select Help»Troubleshooting»NI-488.2 Troubleshooting Wizard.
Page 115
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 use if you have trouble connecting to our Web site or if you do not have internet access.
Page 116
Web sites from If you have trouble connecting to our Web site, please contact your local National Instruments office or the source from which you purchased your National Instruments product(s) to obtain support. For telephone support in the United States, dial 512 795 8248. For...
Page 118
A message that signals the end of a data string. END is sent by asserting the GPIB End or Identify (EOI) line with the last data byte. A GPIB line that signals either the last byte of a data message (END) or the parallel poll Identify (IDY) message. NI-488.2 User Manual for Windows www.natinst.com...
Page 119
(MLA and MTA) and perhaps a secondary address (MSA). The GPIB board has both a GPIB address and an I/O address. GPIB board Refers to the National Instruments family of GPIB interfaces. Go To Local. The GPIB command used to place an addressed Listener in local (front panel) control mode.
Page 120
GPIB reads and writes up to 8 Mbytes/s, depending on your system. Hertz. After each NI-488.2 I/O call, this global variable contains the actual ibcnt number of bytes transmitted. On systems with a 16-bit integer, such as MS-DOS, cross-platform compatibility, use After each NI-488.2 I/O call, this global variable contains the actual...
Page 121
An Individual Status bit of the status byte used in the Parallel Poll Configure function. Listen Address. See MLA. language interface Code that enables an application program that uses NI-488.2 calls to access the driver. Listener A GPIB device that receives data messages from a Talker.
Page 122
Low-speed data transfer between the GPIB interface and memory in which the CPU moves each data byte according to program instructions. See DMA. resynchronize The GPIB software and the user application must resynchronize after asynchronous I/O operations have completed. Request Service. NI-488.2 User Manual for Windows www.natinst.com...
Page 124
GPIB interface or other GPIB device that is the object of the function. Unlisten. The GPIB command used to unaddress any active Listeners. Untalk. The GPIB command used to unaddress an active Talker. NI-488.2 User Manual for Windows www.natinst.com...
Page 125
3-11 items to include, 3-10 placing device offline, 3-12 single GPIB device, 3-8 to 3-9 clearing device, 3-9 communicating with device, 3-9 general steps and examples, 3-8 to 3-9 initialization, 3-8 to 3-9 NI-488.2 User Manual for Windows...
Page 126
Measurement & Automation Explorer, 2-6 to 2-8 advanced communication, 2-7 to 2-8 basic communication, 2-6 to 2-7 using NI-488.2 Communicator, 3-1 to 3-2 communication errors, 4-5 repeat addressing, 4-5 termination method, 4-5 configuration, 1-1 to 1-3. See also Interactive Control utility.
Page 128
Interactive Control utility error information, 6-10 to 6-11 timing errors, 4-4 error variable (iberr), 3-7 ESAC error code, C-5 NI-488.2 User Manual for Windows ESRQ error code, C-8 to C-9 ESTB error code, C-8 ETAB error code, C-9 event notification. See asynchronous event notification in Win32 applications.
Page 129
3-8 using in Interactive Control utility (example), 6-2 ibeos function, 7-1 ibeot function, 7-1 iberr error variable, 3-7 ibnotify function asynchronous event notification example, 7-5 to 7-9 calling, 7-4 to 7-5 NI-488.2 User Manual for Windows Index...
Page 130
B-3 manual. See documentation. Measurement & Automation Explorer, 2-1 to 2-16 accessing additional help and resources, 2-14 to 2-15 National Instruments GPIB Web site, 2-15 NI-488.2 online help, 2-14 to 2-15 adding new GPIB interface, 2-4 to 2-5 www.natinst.com...
Page 131
* ! (execute previous function n times) function, Interactive Control utility, 6-10 n * (execute function n times) function, Interactive Control utility, 6-10 National Instruments Web support, F-1 to F-2 NDAC (not data accepted) line (table), A-3 NI-488.2 calls device-level calls and bus...
Page 132
Index NI-488.2 DLL choosing access method, 3-3 direct entry access, 3-3 NI-488.2 language interfaces, 3-3 NI-488.2 DOS support. See DOS NI-488.2 applications. NI-488.2 programming techniques. See also application development. asynchronous event notification in Win32 applications, 7-4 to 7-9 calling ibnotify function, 7-4 to 7-5...
Page 133
SRQ (service request) line purpose (table), A-3 serial polling automatic serial polling, 7-13 to 7-14 using device-level traditional NI-488.2 calls, 7-14 to 7-15 using multi-device NI-488.2 calls, 7-15 to 7-17 stuck SRQ state, 7-13 SRQI status word condition bit position, hex value, and type...
Page 134
F-1 using Measurement & Automation Explorer, 2-4 Windows 98/95, D-1 to D-8 common questions, D-5 to D-8 NI-488.2 User Manual for Windows Device Manager device status code, D-3 EDVR error conditions, D-1 to D-2 enabling interrupts, D-4 to D-5...