This document provides solutions to GPIB error codes.
Much of the following text is derived from the NI-488.2 User Manual for Windows (see the Additional Resources, below).
Error Condition: Driver error.
Description: EDVR is returned when GPIB hardware is not configured properly, or the interface name or device name passed to the ibfind function is incorrect.
Possible Cause: Often EDVR errors are caused when you misspell the interface name of your board or the device name of your instrument. For example, the default interface name for NI boards is GPIB0, but you may misspell it as GPIBO (with an "oh" instead of a zero). This error may also occur if the board index passed to the ibdev function is incorrect. The board index is the number portion of the interface name for the GPIB board, but many people make the incorrect assumption that it is the primary address of the board. For example, I may install a PCI-GPIB board in my computer and give a primary address of 2. The default interface name for board is GPIB0, so it has a board index of 0, not 2.
Error Condition: Function requires the GPIB board to be the Controller-In-Charge (CIC).
Description: Certain functions require your GPIB board to be the CIC - these functions are noted in the NI-488.2 Function Reference Manual (see the Related Link, below). By default, your GPIB board will be the System Controller, but this is not the same as being the Controller-In-Charge. The System Controller has the ability to become the CIC at any time (there can be one System Controller on a given General Purpose Interface Bus).
Possible Cause: Often ECIC errors are caused when you do not send an interface clear at the start of your program to make sure that your GPIB board is the CIC.
Error Condition: Function detected no Listener(s).
Description: GPIB communications require a single Talker (to write data messages) and one or more Listeners (to read data messages). ENOL usually occurs when a write operation is attempted, but no Listeners are addressed or there are no Listeners at the specified address(es). For a device write, ENOL indicates that the GPIB address you are attempting to communicate with does not match the GPIB address of the device connected to the bus.
Possible Cause: The instrument you are trying to communicate with is not at the expected primary address, the instrument is not powered on, or the cable to the instrument is either disconnected or broken.
Error Condition: GPIB board (GPIB0 or GPIB1) is not addressed correctly.
Description: EADR occurs when the GPIB board is Controller-In-Charge (CIC) and is not properly addressing itself before read and write functions. EADR is also returned by the function ibgts when the shadow handshake feature is requested and the GPIB ATN line is already unasserted. In this case, the shadow handshake is not possible and the error is returned to notify you of that fact.
Possible Cause: Your GPIB board is configured for the same primary address as the instrument with which you are trying to communicate.
Error Condition: Invalid argument to a function call.
Description: EARG results when an invalid argument is passed to a function call.
Possible Cause: The following are some examples: you call ibtmo with a value not in the range 0 through 17 (possible timeout values correspond to a table of values ranging from 0 to 17, where the default is 13, which represents a 10 second timeout); you call ibeos with meaningless bits set in the high byte of the second parameter; or you call ibpad (or ibsad) with invalid addresses.
Error Condition: GPIB board not System Controller as required.
Description: ESAC results when ibsic, ibsre, SendIFC, or EnableRemote is called when the GPIB board does not have System Controller capability.
Possible Cause: The GPIB board is not configured to be the System Controller.
Error Condition: I/O operation aborted.
Description: EABO indicates that an I/O operation has been cancelled for some reason.
Possible Cause: The EABO error is usually the result of a timeout during a read or a write operation, but it can also be caused by calling the ibstop function, the ibclr function, or similar functions while an I/O operation is in progress. You may receive a timeout during write operations with a PCI-GPIB board, if the PCI bus mastering (an option in the BIOS of your computer) is not enabled. You may receive a timeout during read operations, if the instrument you are reading from did not understand the previous command, so it has nothing to write to you. There are a few reasons why the instrument may not have anything to say:
Error Condition: Nonexistent GPIB board.
Description: ENEB occurs when no GPIB board exists at the I/O address specified in the GPIB Configuration Utility. This problem happens when the board is not physically plugged into the system, the I/O address specified during configuration does not match the actual board setting, there is a system conflict with the base I/O address, or the interface name for the board is different from the interface name of the board associated with your device.
Error Condition: Error occurs while using DMA for data transfers.
Description: EDMA occurs if a system DMA error is encountered when the NI-488.2 driver attempts to transfer data over the GPIB using DMA.
Error Condition: Function not allowed while asynchronous I/O is in progress.
Description: EOIP occurs when an asynchronous I/O operation has not finished before some other GPIB call is made. You can only use the ibstop, ibnotify, ibwait, or ibonl function during asynchronous I/O operations. If any other GPIB call is attempted, EOIP is returned.
Possible Cause: Calling any non-supported GPIB function calls during asynchronous I/O.
Error Condition: No capability for operation.
Description: ECAP results when your GPIB board lacks the ability to carry out an operation, or when a particular capability has been disabled in the software and a call is made that requires that capability.
Error Condition: File system error.
Description: EFSO results when an ibrdf or ibwrtf call encounters a problem performing a file operation. Specifically, this error indicates that the function is unable to open, create, seek, write, or close the file being accessed. The specific operating system error code for this condition is contained in ibcntl.
Error Condition: Command byte transfer error.
Description: EBUS results when certain GPIB bus errors occur during device functions. All device functions send command bytes to perform addressing and other bus management operations. Devices are expected to accept these command bytes within the time limit specified by the default configuration or the ibtmo function. EBUS results if a timeout occurred while sending these command bytes.
Possible Cause: There are no GPIB devices attached to your GPIB controller. This can be because all of your instruments are turned off, one of your instruments is in error and is asserting a handshaking line, your GPIB cable is disconnected from your board, or your GPIB cable is broken.
Error Condition: Serial poll status byte(s) lost.
Description: ESTB is reported only by the ibrsp function. ESTB indicates that one or more serial poll status bytes received from automatic serial polls have been discarded due to lack of storage space. Several older status bytes are available; however, the oldest is being returned by the ibrsp call.
Possible Cause: Instrument is repeatedly asserting the SRQ line.
Error Condition: SRQ stuck in the ON position.
Description: ESRQ can only be returned by a device-level ibwait call, in which you have configured the ibwait function to return once the RSQ bit of the status word (ibsta) asserts. ESRQ indicates that a wait for RQS is not possible, because the GPIB SRQ line is stuck ON.
Possible Cause: This situation can be caused by the following events: a cabling problem may be causing the SRQ line to stay asserted; a device unknown to the software is asserting SRQ line - because the software does not know of this device, it can never serial poll the device to unassert the SRQ line; or a GPIB bus tester (or similar equipment) may be forcing the SRQ line to be asserted.
Error Condition: Table problem.
Description: ETAB occurs only during the FindLstn and FindRQS functions. ETAB indicates that there was some problem with a table used by these functions.
Possible Cause: In the case of FindLstn, ETAB means that the given table did not have enough room to hold all of the addresses of the Listeners found. In the case of FindRQS, ETAB means that none of the devices in the given table were requesting service.
Error Condition: GPIB interface is locked and cannot be accessed.
Possible Cause: This error usually occurs when there are two or more processes that want to access the same interface and one process has already locked the interface. This error is returned when the operation cannot be performed because of the existing lock on the interface. It is also returned when a process tries to unlock an interface when no such lock exists.
Error Condition: ibnotify callback failed to rearm.
Possible Cause: This error occurs when we use asynchronous notification (ibnotify) in NI-488.2 applications. This function is useful if you want your application to be notified asynchronously about the occurrence of one or more GPIB events. This event notification is carried out by means of a callback function. The callback function is registered with the NI-488.2 driver when the ibnotify call is made. This error indicates that this callback notification failed to rearm itself by returning an illegal value or when a fatal driver error (EDVR) has occurred.
Error Condition: Input Handle is invalid.
Possible Cause: Several GPIB commands take in the input handle of the board or the device as an input parameter which can be the source of this error. This error can occur under several circumstances. Some scenarios are listed below:
Error Condition: Wait In progress on specified Input handle.
Possible Cause: This error occurs in scenarios that have more than one thread in the same process and when two or more threads are accessing the same interface. EWIP indicates that an ibwait call is already in progress on the specified unit descriptor and it occurs when a thread is already performing an ibwait using the same descriptor and another thread tries to call ibwait on the same descriptor.
Error Condition: Event Notification was cancelled due to a reset of the interface.
Possible Cause: ERST results when an event notification was cancelled due to a reset of the interface. An ibwait call pending in the driver returns ERST in the following situations:
An ibnotify callback may be invoked with ERST in the following situations:
Error Condition: The Interface lost power.
Possible Cause: EPWR results when an interface loses power. This often results when the system goes to and returns from a standby state.