How to acquire data from TDS2014C oscilloscope through Matlab code ?

2 vues (au cours des 30 derniers jours)
Mustafa Alamro
Mustafa Alamro le 18 Jan 2017
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).

Réponses (0)

Catégories

En savoir plus sur Instrument Connection and Communication dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by