iberr

Name

iberr -- holds error code

Synopsis

#include <gpib/ib.h>

volatile int iberr;

Description

iberr is set whenever a function from the 'traditional' or 'multidevice' API fails with an error. The meaning of each possible value of iberr is summarized in the following table:

Table 1. iberr error codes

constantvaluemeaning
EDVR0A system call has failed. ibcnt/ibcntl will be set to the value of errno.
ECIC1Your interface board needs to be controller-in-charge, but is not.
ENOL2You have attempted to write data or command bytes, but there are no listeners currently addressed.
EADR3The interface board has failed to address itself properly before starting an io operation.
EARG4One or more arguments to the function call were invalid.
ESAC5The interface board needs to be system controller, but is not.
EABO6A read or write of data bytes has been aborted, possibly due to a timeout or reception of a device clear command.
ENEB7The GPIB interface board does not exist, its driver is not loaded, or it is not configured properly.
EDMA8Not used (DMA error), included for compatibility purposes.
EOIP10Function call can not proceed due to an asynchronous IO operation (ibrda(), ibwrta(), or ibcmda()) in progress.
ECAP11Incapable of executing function call, due the GPIB board lacking the capability, or the capability being disabled in software.
EFSO12File system error. ibcnt/ibcntl will be set to the value of errno.
EBUS14An attempt to write command bytes to the bus has timed out.
ESTB15One or more serial poll status bytes have been lost. This can occur due to too many status bytes accumulating (through automatic serial polling) without being read.
ESRQ16The serial poll request service line is stuck on. This can occur if a physical device on the bus requests service, but its GPIB address has not been opened (via ibdev() for example) by any process. Thus the automatic serial polling routines are unaware of the device's existence and will never serial poll it.
ETAB20This error can be returned by ibevent(), FindLstn(), or FindRQS(). See their descriptions for more information.

If you wish to avoid using a global variable, you may instead use ThreadIberr() which returns a thread-specific value.