Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

ibwrt returns EADR error

Please see the attached...
0 Kudos
Message 1 of 8
(5,395 Views)
Just so people don't have to open up the PDF if they are glancing at this thread here was the question again:

"GPIB problems
I have a GPIB-USB-B adapter connecting a PC (XP) with an Agilent 54621D. I have had this interface working correctly in the past but it now does not work. I believe it last worked before I uninstalled then reinstalled the GPIB drivers.
As shown below the GPIB-USB-B checks out OK but an ibwrt command returns an EADR error. The scope GBIB has an address of 7.
Please see the screen shots below."

The EADR is usually associated with the GPIB controller (in your case the GPIB-USB-B) not properly addressing itself before read and write functions. If this is your only GPIB controller on this computer, I would try clicking the "restore defaults" and try again. If this does not work, it would be useful for you to post an NI-Spy file so we can see exactly what is going on underneath.

Here are the links I got this information from:

KB:Performing a Good NI-Spy Capture for Debugging/Troubleshooting
KB:GPIB Error Codes and Common Solutions (Part 1)

Don't be too frustrated, it is Friday!
-Marshall R
0 Kudos
Message 2 of 8
(5,375 Views)

same problem for me, any solutions ?

 

my testbench worked perfectly, my matlab scrip was perfecly running.

 

I restarted my testbench and since this time i have the "too many listeners on GPIB" problem ....

0 Kudos
Message 3 of 8
(4,545 Views)

Hello Panio,

 

Are you getting the same error code?  If not, what error code are you getting?  If you are getting the same error code, did you go through the proposed solutions in the article linked above (http://digital.ni.com/public.nsf/allkb/2FA525A8585A92E9862566EE002A3755?OpenDocument#EADR) ?

Michael B.
Applications Engineer
0 Kudos
Message 4 of 8
(4,528 Views)

I have the EADR error, i don,t know if there is a conplement error code

 

I try all of thoses solutions but i don't know exactly what is the problem

My GPIB-USB is linking Matlab with a Keithley picoammeter, it work perfectly, i restarted, it didn't work at all

 

i tryed some different adresses , i check if my card was corectly adressed ... nothing debug it

 

thanks fot your help

 

Sylvain Panier.

0 Kudos
Message 5 of 8
(4,521 Views)

Hi Sylvain,

 

What is your picoammeter address and what is your GPIB-USB address? These need to have different addresses, and you need to make sure that your program uses the correct address for the correct function. I belive that during initialization the input should be the address of the GPIB-USB, and during Write the address should be the address of the picoammeter. Does that make sense? If you use the same address for both initialization and for read/write, you will probably get an error.

 

Regards,


Daniel H.

Daniel Hays | Test Software Business Manager
0 Kudos
Message 6 of 8
(4,512 Views)

 

What is your picoammeter address and what is your GPIB-USB address? These need to have different addresses, and you need to make sure that your program uses the correct address for the correct function. I belive that during initialization the input should be the address of the GPIB-USB, and during Write the address should be the address of the picoammeter. Does that make sense? If you use the same address for both initialization and for read/write, you will probably get an error.

 

My picoammeter is at GPIB0-16 and my GPIB-USB is at GPIB0-0

 

When my testbench worked; I was initializing and writing on the picoammeter's adress

It worked perfectly two day and didn't the third when I restarted my testbench


 

 

My Matlab code to initialize :

 

%MATLAB_GPIB_LOG Code for initialising the Picoammeter


% Find a GPIB object.
obj1 = instrfind('Type', 'gpib', 'BoardIndex', 0, 'PrimaryAddress', 16, 'Tag', '');

% Create the GPIB object if it does not exist
% otherwise use the object that was found.
if isempty(obj1)
    obj1 = gpib('ni', 0, 16);
else
    fclose(obj1);
    obj1 = obj1(1);
end;


% Connect to instrument object, obj1.
fopen(obj1);

% Communicating with instrument object, obj1.
query(obj1, 'DISP:ENAB OFF');
query(obj1, '*IDN?');
query(obj1, '*RST');
query(obj1, 'SYST:ZCH ON');
query(obj1, 'RANG 2e-9');
query(obj1, 'INIT');
query(obj1, 'SYST:ZCOR:ACQ');
query(obj1, 'SYST:ZCOR ON');
query(obj1, 'RANG:AUTO ON');
query(obj1, 'SYST:ZCH OFF');
query(obj1, 'FORM:ELEM READ');
query(obj1, 'READ?');
query(obj1, 'FORM:ELEM READ');

0 Kudos
Message 7 of 8
(4,504 Views)

Hi Sylvain,

 

If this is the only GPIB controller on your computer, have you tried restoring its defaults? It seems like when you restarted your testbench something might have changed in the USB-GPIB address. 

 

Daniel H.

Daniel Hays | Test Software Business Manager
0 Kudos
Message 8 of 8
(4,490 Views)