How to acquire data from TDS2014C oscilloscope through Matlab code ?

2 ビュー (過去 30 日間)
Mustafa Alamro
Mustafa Alamro 2017 年 1 月 18 日
I am working on acquiring data from a Tektronix hardware TDS2014C through Matlab and need a little help in the following issue. In my full system I am transmitting a Binary block (Image converted to binblock) through Tektronix AFG3021B and on the Rx side I have a problem in acquiring the transmitted data. I am using the following code:
interfaceObjb = instrfind('Type', 'visa-usb', 'RsrcName', 'USB0::0x0699::0x03A4::C011630::0::INSTR', 'Tag', '');
if isempty(interfaceObjb)
interfaceObjb = visa('TEK', 'USB0::0x0699::0x03A4::C011630::0::INSTR');
else
fclose(interfaceObjb);
interfaceObjb = interfaceObjb(1);
end
deviceObj = icdevice('tektronix_tds2014.mdd', interfaceObjb);
connect(deviceObj);
groupObj = get(deviceObj, 'Waveform');
groupObj = groupObj(1);
myScope = interfaceObjb;
invoke(deviceObj, 'autoset');
yRx = invoke(groupObj, 'readwaveform', 'channel1');
Then I am demodulating the received data (yRx), but I cannot retrieve the exact transmitted data!!! The following code shows the process done before transmitting:
binblock(2:2:end) = bitand(dataMod, 255);
binblock(1:2:end) = bitshift(dataMod, -8);
binblock = binblock';
% Build binary block header
bytes = num2str(length(binblock));
header = ['#' num2str(length(bytes)) bytes];
Where dataMod is the output Array of PAM (pulse amplitude modulation).

回答 (0 件)

カテゴリ

Help Center および File ExchangeInstrument Connection and Communication についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by