![Krohn-Hite 3945 Operating Manual Download Page 40](http://html1.mh-extra.com/html/krohn-hite/3945/3945_operating-manual_2004086040.webp)
ibonl (GpibDev, 0); /* Release the device handle */
ibonl (GpibBoard, 0); /* Release the board handle */
exit(0); /* exit with no error */
} /* main */
/*===================================================================
*
Function GPIBERR
*
This function will notify you that a NI-488 function failed by
*
printing an error message. The status variable IBSTA will also be
*
printed in hexadecimal along with the mnemonic meaning of the bit position.
*
The status variable IBERR will be printed in decimal along with the
*
mnemonic meaning of the decimal value. The status variable IBCNT will
*
be printed in decimal.
*
*
The NI-488 function IBONL is called to disable the hardware and software.
*
*
The EXIT function will terminate this program.
*=======================================================================
*/
void gpiberr(char *msg) {
Unsigned int I;
/*
Table of ibsta (interface board status word) bit positions and
corresponding messages */
statis struct { in bit; char *msg;} ibstaMsg [16]=
{
{ERR, “ ERR”},
{TIMO, “ TIMO”},
{END, “ END”},
{SRQI, “SRQI”},
{RQS, “RQD”},
{SPOLL, “SPOLL”},
{EVENT, “ EVENT”},
{CMPL, “ CMPL”},
{LOK, “ LOK”},
{REM, “ REM”},
{CIC, “ CIC”},
{ATN, “ ATN”},
{TACS, “ TACS”},
{LACS, “ LACS”},
{DTAS, “ DTAS”},
{DCAS, “ DCAS”} };
/*
Table of iberr error messages */
static struct { int val; char *msg;} iberrMsg[15]=
Section 3 - GPIB Programming
3-15
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com