How to acquire data from TDS2014C oscilloscope through Matlab code ?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Instrument Connection and Communication 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!