AnsweredAssumed Answered

Controlling ENA E5070B using a graphical user interface (Matlab)

Question asked by danhen2014 on Jun 26, 2014
Latest reply on Jul 14, 2014 by danhen2014
Dear Agilent's representatives


I'm trying to create an application in Matlab to control a network analyzer ENA E5070B. However many questions are popping up and delaying development. So I ask for help.

Here are my questions :

1 - I create a GUI in Matlab (graphical interface) and I'm trying to read S parameters from E5070B and then generate a graph S11 (db) x Frequency (GHz) and also a table. 

I did this using the following commands (Matlab commands calling SCPI commands) :


E5070 = visa ('agilent', 'GPIB0 :: 17 :: INSTR');
E5070.InputBufferSize = 8388608;
E5070.ByteOrder = 'littleEndian';
fopen (E5070);
fprintf (E5070, '10 OUTPUT 717 ');
fprintf (E5070 ': CALC1: PAR1: DEF S11');
SP = str2num (fscanf (E5070));
plot (SP, 'b');
hold on;
grid on;
fclose (E5070);
delete (E5070);
clear E5070;

Error message : "Warning: Unsuccessful read: VISA: A timeout occurred"


2 - I don't know if it's possible, but I would take a screenshot of the E5070B every 100 ms. Could you send a
possible sequence of commands to do this?



3 - In my GUI (graphical interface), there are fields for the user to enter the start frequency, stop frequency
and the number of sweep points. I have questions about how to use Matlab GUI to enter with an information
that will go to a SCPI command.  How to enter data in SCPI commands ?


4 - The last question is about reading systemic errors to one port (es, ed, er). I'm using the following sequence
commands:

E5070 = visa ('agilent', 'GPIB0 :: 17 :: INSTR');
E5070.InputBufferSize = 8388608;
E5070.ByteOrder = 'littleEndian';
fopen (E5070);
fprintf (E5070, '10 CALL Exec_error_term (@ Agte507x, "READ", "ED", Ch $, 5, Nop, 1.1, Stok (*)) ');
fprintf (E5070, '20 CALL Exec_error_term (@ Agte507x, "READ", "ED", Ch $, 6, Nop, 2.2, Stok (*)) ');
ed = str2num (fscanf (E5070))
fclose (E5070);
delete (E5070);
clear E5070;


Error message : "Warning: Unsuccessful read: VISA: A timeout occurred"

All the functions mentioned were called from callbacks of GUI pushbuttons. I am grateful for the technical support and attention.



Thank you,

Daniel (student of electrical engineering - Masters)  

Outcomes