We have same communication problems between Keithley 6514 and an NI GPIB ISA card.
We work under Linux 2.2.14-50 (i586) operative system, distribution Red Hat release 6.2 (Zoot).
We want to use a Keithley 6514 with a National Instruments AT-GPIB/TNT+ ISA card.
The NI driver release is 0.6 (nigpib-0.6) and seems installed without problems.
We use a National Instrumets connection cable between the card and the device.
The Keithley 6514 device that we use for the test, works correctly with LABVIEW and Windows
operative system.
We use the 'libgip' library for communicate with the NI card and the Keithley 6514 device.
Anything tries to send the Keithley the result it is the same:
1- the Keithley enters in LSTN mode;
2- after a long time the Keithley's display shows the error code -420
for an instant;
3- after the error code visualization it enters in TLK mode;
4- at this point, again after a long time, the software returns the
control with no
results or with a software error code.
The software error code that we identifies in the documentation of 'libgip' software library is the EBUS error code:
...(follows from the manual of the NI driver)...
EBUS (14):
EBUS results when certain GPIB bus errors occur during device functions. All device functions send command bytes to
perform addressing and other bus management. Devices are expected to accept these command bytes within the time
limit specified by the configuration program or by ibtmo. EBUS occurs if a timeout occurred during the sending of these
command bytes. Under normal operating circumstances, the remedy would be to find out which GPIB device is accepting
commands abnormally slow and fix the problem with that device. In situations in which slow handshaking of the
commands is desirable, lengthen the board time limit either with the configuration program or the ibtmo function.
...
We have tried to change the time limit with ibtmo software library funcion and with ibconf NI device driver configuration
software but with no results.
We have tried to communicate with Keithley with the NI 'ibic' test software and with our C programs that use the 'libgip'
C software library.
We think that probably the problem is in EOI or EOS character.
I send to you two .txt file in attach, the first 'screen_ibconf.txt', contains
the screen shoots of 'ibconf' settings for the NI AT-GPIB/TNT+ and for
the device1, Keithley 6514. The second file, 'GPIB_library_code.txt', contains the the code of the C function that we use
in our software.
I hope that the information that I send you be complete and sufficient.
Stefano Moscogiuri
s,moscogiuri@lab-link.it
________________________________________________________________________________
----------------------+----------------------------------+---------------------
National Instruments | Board characteristics | LINUX EISA/PCI 0.5.1
----------------------+-----------------+----------------+---------------------
Board: gpib0 | SELECT (use H or L key):
----------------------------------------+--------------------------------------
Primary gpib address @ 00H | 00H to 1EH
Secondary gpib address ........ NONE |
Timeout setting ............... T10s |
EOS byte ...................... 0AH |
Terminate read on EOS ......... no |
Set EOI with EOS on write ..... no |
Type of compare on EOS ........ 7-bit |
Set EOI w/last byte of write .. yes |
Board is system controller .... yes |
Disable auto serial polling ... no |
Timing ........................ 500nsec |
UNIX signal.................... 2 |
Slot number assignment......... NONE |
|
|
|
(Use J or K key to change fields) |
----------------------------------------+--------------------------------------
^A: help ^W: explain field ^Y: reset value ^O: return to map
________________________________________________________________________________
----------------------+----------------------------------+---------------------
National Instruments | Device characteristics | LINUX EISA/PCI 0.5.1
----------------------+-----------------+----------------+---------------------
Device: dev1 Access: gpib0 | SELECT (use H or L key):
----------------------------------------+--------------------------------------
Primary gpib address @ 01H | 00H to 1EH
Secondary gpib address ........ NONE |
Timeout setting ............... T10s |
EOS byte ...................... 0AH |
Terminate read on EOS ......... no |
Set EOI with EOS on write ..... no |
Type of compare on EOS ........ 7-bit |
Set EOI w/last byte of write .. yes |
Repeat addressing ............. no |
|
(Use J or K key to change fields) |
|
|
|
|
|
|
----------------------------------------+--------------------------------------
^A: help ^W: explain field ^Y: reset value ^O: return to map
int Gpib_Read(unsigned char instr_addr, double *value)
{
short address;
char key_read [BUF_SIZE];
#if C_PERIPH == C_REAL
switch (instr_addr)
{
case 1:
address = KEY1;
break;
case 2:
address = KEY2;
break;
case 3:
address = KEY3;
break;
case 4:
address = KEY4;
}
SendIFC(0); //clear the bus
if (ibsta & ERR) { //check for error
gpiberr ("SendIFC Error");
exit(1);
}
DevClear(0, address); //clear the device
Send(0, address, "*RST;", 5L, NLend);
Send(0, address, ":Display:Enab On;Window1:Text:State Off;", 40L, NLend);
Send(0, address, ":SYST:ZCH OFF;", 13L, NLend);
Send(0, address, ":SYST:ZCOR OFF;", 14L, NLend);
Send(0, address, ":FUNC 'CURR';", 12L, NLend);
Send(0, address, ":CURR:RANG 2e-12;", 16L, NLend);
Send(0, address, ":CURR:RANG:AUTO ON;", 18L, NLend);
Send(0, address, ":CURR:NPLC 1.0;", 14L, NLend);
Send(0, address, ":TRIG:COUN 1;", 12L, NLend);
Send(0, address, "DEL 0.000000E+0;", 15L, NLend);
Send(0, address, "SOUR IMM;TCON:DIR ACC;", 21L, NLend);
Send(0, address, ":TRIG:TCON:ASYN:OUTPUT SENS;", 21L, NLend);
Send(0, address, ":READ?", 6L, NLend);
Receive(0, address, key_read, 20L, STOPend);
*value = atof(key_read);
//We're done with the program, so take the board off-line
ibonl(0,0);
return OK;
#else
switch (instr_addr)
{
case 1:
*value = 345.56;
break;
case 2:
*value = 750.1254;
break;
case 3:
*value = 0.000124357;
break;
case 4:
*value = 0.1368932;
}
return OK;
#endif
}
void gpiberr(char *msg) {
printf ("%s\n", msg);
printf ( "ibsta=&H%x ", ibsta, "< ");
if (ibsta & ERR ) printf (" ERR");
if (ibsta & TIMO) printf (" TIMO");
if (ibsta & END ) printf (" END");
if (ibsta & SRQI) printf (" SRQI");
if (ibsta & RQS ) printf (" RQS");
if (ibsta & CMPL) printf (" CMPL");
if (ibsta & LOK ) printf (" LOK");
if (ibsta & REM ) printf (" REM");
if (ibsta & CIC ) printf (" CIC");
if (ibsta & ATN ) printf (" ATN");
if (ibsta & TACS) printf (" TACS");
if (ibsta & LACS) printf (" LACS");
if (ibsta & DTAS) printf (" DTAS");
if (ibsta & DCAS) printf (" DCAS");
printf (">\n");
printf ("iberr= %d", iberr);
if (iberr == EDVR) printf (" EDVR < Error>\n");
if (iberr == ECIC) printf (" ECIC
\n");
if (iberr == ENOL) printf (" ENOL \n");
if (iberr == EADR) printf (" EADR \n");
if (iberr == EARG) printf (" EARG \n");
if (iberr == ESAC) printf (" ESAC \n");
if (iberr == EABO) printf (" EABO \n");
if (iberr == ENEB) printf (" ENEB \n");
if (iberr == ECAP) printf (" ECAP \n");
if (iberr == EFSO) printf (" EFSO \n");
if (iberr == EBUS) printf (" EBUS \n");
if (iberr == ESTB) printf (" ESTB \n");
if (iberr == ESRQ) printf (" ESRQ \n");
if (iberr == ETAB) printf (" ETAB \n");
printf ("ibcnt= %d\n", ibcnt);
printf ("\n");
/* Call the ibonl function to disable the hardware and
* software.
*/
ibonl (0,0);
}