联系我们

与泰克代表实时聊天。 工作时间:上午 9:00 - 下午 5:00(太平洋标准时间)。

电话

致电我们 1-800-833-9200

工作时间:上午9:00-下午5:00(太平洋标准时间)

下载

下载手册、产品技术资料、软件等:

下载类型
型号或关键字

反馈

How do I get a waveform in Matlab with the IVI-COM driver?

问题:

How do I get a waveform in Matlab with the IVI-COM driver?

答案:

Here is some sample Matlab code. Note the IVI-COM driver and Shared components must already be installed.:


%To establish communication with the oscilloscope, you create a MATLAB COM
%object that represents an instance of the driver.
h = actxserver('TekScope.TekScope.1');
%Next, you need to initialize the driver.
invoke(h,'Initialize','GPIB0::1::INSTR',false,false,'');
hscope = get(h,'IviScope');
%Read the identification information by first getting the Identity interface and thenreading the properties of this interfaces.
hid = get(hscope,'Identity');
ms = get(hscope,'Measurements');
ms1 = get(ms,'Item',get(ms,'Name',1));
invoke(ms,'Initiate');
A = get(hscope,'Acquisition');
recordLength = get(A,'RecordLength');
data = zeros(recordLength,1);
disp('Fetching waveform');
timeout = 1000; % In milliseconds
data = zeros(recordLength,1);
initX = 0;
Xinc = 0;
[status,data,initX,Xinc] = invoke(ms1,'ReadWaveform', timeout, data, initX, Xinc);
t = initX:Xinc:initX+(Xinc*(recordLength-1));
plot(t,data)


此常见问题适用于:

无产品系列

产品:

常见问题 ID 52576

查看所有常见问题 »