Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Keithley 238 GPIB Driver Function-ibpad and iberr

My PC has two GPIB piggy-backed, one to an auto-prober (Gpib Address=5) and one to Keithley 238 (GPIB address=4). Mid-way through testing, the PC sometimes loses communication with Keithley. I am using the driver functions by National Instr. in the file ke238.c. In the function ke238_init, there is a call to ibpad.
Using NI Spy, the commands sent/received over the GPIB from a normal, problem-free run are: ibpad(UD1, 4); Status=0x0100; iberr=4; ibcntl=0x0000. This line raises a lot of questions.
Is it necessary to send an ibpad command in the ke238_init function?
Why do I always receive an iberr=4 reply to this command?
Why do subsequent calls of ibwrt, ibrd proceed without any iberr or problems after ibpa
d returns iberr=4?
Most of the time, my program is able to step through the entire wafer and finish testing without any communication problems with Keithley. However, I am wondering if maybe this iberr=4 can be the source of sporadic communication problems with the Keithley. I do not know how to fix the iberr=4 problem, or if I even need to worry about it.
From the one Spy log file I have when I lost communication with the Keithley, the last command captured was ibrsp(UD2, 70(0x46)), which was to the prober. The next command that should have been sent, ibpad, was never sent. I do not know the cause of this problem.

Any inputs to my inquiries above would be greatly appreciated. Thank you.

Regards,
Lost and Confused
0 Kudos
Message 1 of 2
(3,463 Views)
Hi Lost,

You've raised questions regarding several issues. I'm not familiar with the function calls in ke238.c, but keep in mind that the error variable iberr is meaningful only when the ERR bit in the Status variable, ibsta, is set. The ERR bit is the most significant (leftmost) bit in the 4-digit hex value of the Status variable. Since the ERR bit is not set in your Status variable, the value of iberr is not important. This is better documented in the NI-488.2 Help file (Start -> Programs -> National Instruments -> NI-488.2 -> NI-488.2 Help. Search on iberr and ibsta).

It might be useful to look at program execution at ibrsp. It this command successfully returning or is the program hanging here? Check the value of ibsta and decode the meaning
using the NI-488.2 Help file again.

There is also another discussion forum post regarding Keithley 238 GPIB Communication that experienced similar problems. It seems that in that case, putting delays in the code solved the issue. It's worth giving that a try. You might even try contacting that person for more programming advice if you're still having trouble.

Best of luck!

Kileen Cheng
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(3,463 Views)