AnsweredAssumed Answered

Capturing N9010A Trace Data with Matlab

Question asked by rater on Jan 29, 2015
Latest reply on Feb 27, 2015 by vcherian
I'm trying to capture trace data from a N9010A Signal Analyzer using Matlab.  When capturing data in ASCII format, the data MATLAB captures matches the Signal Analyzer display.  However, when reading the data in 32-bit float or 32-bit integer format, the data looks nothing like the display and is scaled by several orders of magnitude.  I must have a data conversion issue, but I'm unable to figure out what I'm doing wrong.  

Using the relevant code below to capture the data in 32-bit integer format:

+% Connect to N9010A Signal Analyzer over GPIB+
+obj= gpib('ni', 1, 18);+
+fopen(obj);+

+% Reset to known state+
+fprintf(obj,'*RST');+

+% Set data format+
+fprintf(obj,':FORM:DATA INT,32');+

+% Query trace data+
+fprintf(obj,':TRAC:DATA? TRACE1');+

+% Read data+
+data = binblockread(obj,'int32');+

Does anyone have insight into what I'm doing wrong?

Edited by: Chris8529 on Jan 29, 2015 12:42 PM

Edited by: Chris8529 on Jan 29, 2015 12:44 PM

Edited by: Chris8529 on Jan 29, 2015 12:45 PM  

Outcomes