亲爱的安捷伦代表我正在尝试在
matlab中创建一个应用程序来控制网络分析仪ENA E5070B。
然而,许多问题突然出现并推迟了发展。
所以我请求帮助。
以下是我的问题:1 - 我在Matlab(图形界面)中创建了一个GUI,我试图从E5070B读取S参数,然后生成图形S11(db)x频率(GHz)以及表格。
我使用以下命令(Matlab命令调用SCPI命令)执行此操作: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));
情节(SP,'b');
等一下;
网格;
fclose(E5070);
删除(E5070);
清除E5070;
错误消息:“警告:读取失败:VISA:发生超时”2 - 我不知道是否可能,但我会每100毫秒截取E5070B的屏幕截图。
你能发送一个可能的命令序列吗?
3 - 在我的GUI(图形界面)中,有一些字段供用户输入起始频率,停止频率和扫描点数。
我对如何使用Matlab GUI输入将转到SCPI命令的信息有疑问。
如何在SCPI命令中输入数据?
4 - 最后一个问题是关于向一个端口(es,ed,er)读取系统错误。
我正在使用以下序列命令: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);
删除(E5070);
清除E5070;
错误消息:“警告:读取失败:VISA:发生超时”提到的所有功能都是从GUI按钮的回调中调用的。
我很感谢技术支持和关注。
谢谢Daniel,(电气工程系硕士 - 硕士)
以上来自于谷歌翻译
以下为原文
Dear Agilent's representa
tives
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)