?? basic control using instr driver.m
字號:
% MATLAB/MXA example 2
% Using the MXA Instrument Driver
% Version: 1.0
% Date: Sep 11, 2006
% 2006 Agilent Technologies, Inc.
% Initial setup
mxa_ip = '141.121.92.157';
mxa_port = 5025;
fprintf('\nConnecting to MXA ...\n');
% MXA Interface creation and connection opening
mxa_if = tcpip(mxa_ip,mxa_port);
mxa = icdevice('agilent_mxa.mdd', mxa_if);
connect(mxa,'object')
% Intrument identification
idn = mxa.InstrumentModel;
fprintf('Hello from %s\n', idn);
% Set the center frequency to 1 GHz
mxa.CenterFreq = 1e9;
% optionally, the center frequency parameter can be
% changed using set(): set(mxa, 'CenterFreq', 1e9);
% Set the span to 20 MHz
mxa.Span = 20e6;
% Set the reference level to +10 dBm using set()
set(mxa, 'RefLevel', 10);
% Query the resolution bandwidth
rbw = mxa.ResBW;
fprintf('Resolution bandwidth: %d kHz\n', rbw/1e3);
% Query the sweep time using get()
swp = get(mxa, 'SweepTime');
fprintf('Sweep time: %d ms\n', round(swp*1000));
% Close the MXA connection and clean up
fprintf('Disconnecting from MXA ...\n');
disconnect(mxa);
delete(mxa);
clear mxa;
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -