|| 3.27 out of 5
GPIB Error Codes and Common Solutions (Part 1)
Primary Software Version:
Primary Software Fixed Version:
What is the solution to my GPIB error code?
Much of the following text is derived from the NI-488.2 User Manual for Windows (see the Related Link, below):EDVR (0)Error Condition:
EDVR is returned when GPIB hardware is not configured properly, or the interface name or device name passed to the
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
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.Solutions:
ECIC (1)Error Condition:
- Use the default settings for your GPIB hardware in the GPIB Configuration Utility (i.e., GPIB0 for the interface name and zero for the primary address).
- Use the
ibdev function instead of the
ibfind function to open communications with your instrument (to avoid using its device name).
- If you must use device names for your instruments, then make sure they are correctly configured in the Device Templates of the GPIB Configuration Utility (see your NI-488.2 User Manual for more details).
- Use the unit descriptor returned from
ibfind as the first parameter in subsequent NI-488 functions. Examine the variable before the failing function to make sure its value has not been corrupted.
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.Solutions:
ENOL (2)Error Condition:
- If your GPIB board is supposed to be the System Controller, then use
ibrsc 1 to make sure your GPIB board is configured as the System Controller.
- If your GPIB board is the System Controller, then use the
ibsic function (or
SendIFC function) to send an interface clear. This will make your GPIB board the CIC (it also resets GPIB communications on the bus).
- If your GPIB board is one of several controllers on the bus, then always check for the CIC bit of the status word,
ibsta, before attempting any function calls that require your GPIB board to have CIC status. If it does not appear, then you can call the
ibwait function (set the wait mask for the CIC bit) to delay further processing until control is passed to your GPIB board.
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 mach 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.Solutions:
EADR (3)Error Condition:
- Make sure that the GPIB address of your device matches the GPIB address of the device to which you want to write data.
- Verify that the cable is properly connected to the instrument. Try switching cables to verify that the cable is not broken.
- Make sure that at least two-thirds of your devices are powered on.
- For board-level communications, use the appropriate hex code in the
ibcmd function to address your device as a Listener.
- Call the
ibpad function (and
ibsad, if necessary) to set the primary address of your device. The
ibpad function will return what the previous setting for the device was, and you can check to see if the configured address matches the device's actual address.
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
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.Solutions:
EARG (4)Error Condition:
- Never configure your GPIB board to the same address as your device. You should (almost) always leave your GPIB board configured for primary address 0 and no secondary address. Call
ibpad 0 and
ibsad 0 at the beginning of your program to properly configure your board’s address.
- Make sure that the GPIB board is addressed correctly before calling
ibrd, ibwrt, RcvRespMsg, or SendDataBytes.
- Avoid calling
ibgts, except immediately after an
ibcmd call. The
ibcmd function causes the ATN line to be asserted, which tells instruments to expect command messages, instead of data messages.
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
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
with meaningless bits set in the high byte of the second parameter; or you call
) with invalid addresses.Solutions:
ESAC (5)Error Condition:
- Check the NI-488.2 Function Reference Manual (see the Related Link, below) to make sure that your parameters are valid.
- Do not use a device descriptor in a board-level function or a board descriptor in a device-level function.
GPIB board not System Controller as required.Description:
ESAC results when
ibsic, ibsre, SendIFC,
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. Solutions:
EABO (6)Error Condition:
- Give the GPIB board System Controller capability by calling
ibrsc 1 or by using the GPIB Configuration Utility.
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
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:
- The message to the instrument may have been misspelled. For example, "*IDN?" is a common identification query for IEEE 488.2 compliant instruments. It is easy to misspell this message as "*IND?", which the instrument will not understand, so it will not generate a message string for you to read from the instrument.
- The message to the instrument may contain a command that the instrument does not understand. For example, the "*IDN?" message from the previous example is only understood by IEEE 488.2 compliant instruments. If your instrument is an older, non-IEEE 488.2 compliant device, then it will not understand "*IDN?", so it will not generate a message string for you to read from the instrument.
- The instrument may use a particular EOS (end of string) character as its termination method, but you may forget to append this termination character to your message. For example, if your instrument expects a linefeed as the EOS character, then "ID?" will not work, but "ID?\n" (where \n represents a linefeed in IBIC) will.
- You may expect to see EOI (end or identify, one of the five bus management lines) as the termination method, but if the instrument does not set the EOI line when it finishes sending its message, any read operation that you perform will time out.
ENEB (7)Error Condition:
- Make sure that your messages consist of commands that the instrument understands. Check your device's user manual for a list of possible commands.
- Check the user manual to see if your instrument needs to be in a GPIB or 488.2 mode in order to be a GPIB Listener. Often instruments will only respond to the standard commands after they have been placed in this mode, and otherwise they will give an error despite being sent a valid command.
- Verify that you are using the correct termination method for your instrument. Byte count (where you expect to receive a certain number of bytes in a message) is always used, but some instruments use EOS and byte count, some use EOI and byte count, and some use only byte count. Check your device's user manual for the possible termination methods to use with your instrument.
- If EOS is the termination method, then be sure to append the termination character to the end of your message. You can specify the termination character in the GPIB Configuration Utility, but the NI-488.2 driver will not automatically append it for you!
- Lengthen the timeout period for I/O operations using the
- If you receive all of the data and get an EABO error, then look for a particular end of string character (e.g., linefeed or carriage return) and configure the GPIB board to terminate the read on that character using the
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 mach 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.Solution:
- Determine the base I/O address for your board by looking in the GPIB Configuration Utility. Check your system's resource manager to see if another board is trying to use part or all of this address range. Make sure that the interface name of your board is the same as the interface name of the board that your device is configured to communicate with (see KnowledgeBase 2368N85R, linked below).
- For legacy boards make sure that the jumpers and dip switches on the board are set to the same resource settings that the GPIB Configuration Utility thinks it is using.
- Power down your computer and make sure that the board is firmly seated in its slot.
This troubleshooting information is continued in Knowledge Base 1XOHEPPH: GPIB Error Codes and Common Solutions (Part 2)
and Knowledge Base 3CO9NH3F GPIB Error Codes and Common Solutions (Part 3)
KnowledgeBase 2368N85R: ENEB Error (Non-existent GPIB Board Error) During Communication with InstrumentProduct Manuals: NI-488.2 User Manual for WindowsGPIB Support: Introduction to the Interactive Control (IBIC)Knowledge Base 1XOHEPPH:GPIB Error Codes and Common Solutions (Part 2)Knowledge Base 3CO9NH3F GPIB Error Codes and Common Solutions (Part 3)