AnsweredAssumed Answered

Error with Real32 data transfer from E8362B w/ Matlab &

Question asked by adamS on Sep 8, 2007
Latest reply on Sep 9, 2007 by odanzy
I am unable to successfully read real32 data from a Agilent 8362B using MATLAB with GPIB. 

The ASCII transfer works correctly but I need to use real32 to speed up the measurements, however, the transfer gives me an EOI assertion prior to transfer completion

My setup is as follows:
Agilent 8362B PNA (firmware: A.06.04.32)
NI USB-GPIB connecter (NI 488.2 version 2.52)
Matlab (Version 7 R14)

I read 16001 ASCII data points w/o problems using the following:

fprintf(pna, 'FORM ASCII');
fprintf(pna, 'CALC:DATA? FDATA');
magnitude = str2num(fscanf(pna));


When I try to read 16001 REAL32 data points, I get an EOI assertion prior to transfer completion.  My code is as follows:

fprintf(pna, 'FORM ASCII');
fprintf(pna, 'CALC:DATA? FDATA');
numDigits = fscanf(pna, '%c', 2)
byteCount = fscanf(pna, '%f', str2num(numDigits(2)))
magnitude = fscanf(pna, '%c', byteCount);


The variable 'byteCount' returns '64004' (16001 point x 4 bytes) from the header however the variable 'magnitude' never contains 64004 bytes.  The transfer is always cut short and with an EOI error.

Has anyone encountered a similar problem?  

Outcomes