MATLAB: Anritsu ms2691a

anritsugpib

Hello, I'm using Anritsu MS2691A Signal Analyzer connected with Matlab via GPIB cable.
I have problem on reading the file that was captured by Matlab.
Can you please help to advice how can I read those file. I'm using binblockread command which the format of return data from the instrument is REAL 32. However, I didn't get the signal that I want to.
fprintf(signalAnalyzerObject,'FORM REAL,32');
% Read the IQ data
datacapture = query(signalAnalyzerObject,'DATA?');
disp(['IQ Data Captured: ' datacapture]);
fprintf(signalAnalyzerObject,'DATA?');
data = binblockread(signalAnalyzerObject,'float32');

Best Answer

Use
num2hex(data(1))
to look at the bytes of the response, and compare that to (for example)
num2hex(single(1.234))
or a value in the range you are expecting for the response. My guess is that the bytes are in a different order than you need, and that you will need to swapbytes(data)