Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Error: "NO LISTENER ON BUS" - Matlab instrument control using NI GIPB interface

Hello,
  I´m using MATLAB to control the HP3577A Network Analyser through a National Instruments GPIB interface. I am able to do everything (configure, run measurements etc.) except to read data from the instrument. Strangely, when I send a command to read data using fprintf, the instrument immediately displays the error "NO LISTENER ON BUS". Following, if I execute the command fscanf(na), nothing is read and a timeout error occurs. I´ve controlled several instruments through GPIB using Matlab and I´ve never seen this happen before. A example, the small code below generates this error (though I have made several attempts with different instrument configurations and codes):

na = gpib('ni', 0, 6);
fopen(na);
fprintf(na,'TKM');             % Take a measurement
fprintf(na,'DRR');             % Dump register R - Here, the error message "NO LISTENER ON BUS" appears on the instruments display

med = fscanf(na);            % Nothing is read until timeout
...

Please, help me.
0 Kudos
Message 1 of 3
(3,703 Views)

ricpc,

The best action would be to get a NI-spy capture so that we can see the low level GPIB calls that are used to setup your device.  This will show us the card that the driver thinks it is using as well as the primary address.  The No Listener error usually happens because you are not using the correct primary address.  If Measurement and Automation Explorer is installed, you can also try scanning for instruments using your GPIB card.  You should see any instruments attached to the bus below the card.  You should make verify the primary address using this method.

Spy Capture
http://digital.ni.com/public.nsf/allkb/8D890EC09B15C05A86256E6F007E3E86

Scan for Instruments
http://www.ni.com/support/gpib/max/scan.htm

Thanks,
Steven T.

0 Kudos
Message 2 of 3
(3,669 Views)
Thank you Steven, I´ll try it.
0 Kudos
Message 3 of 3
(3,660 Views)