Question
There are different ways to get data from the instrument, the easiest way would be to ask for trace data in ASCII format. This is sufficient for simple analysis such as signal duration or power measure.
However, if it comes to vector signal analysis for example, it’s required to get the data in IQ format.
The following description is related to R&S FSW Spectrum Analyzer family and might slightly differ for other instruments.
IQ data can be read with the SCPI command TRAC:IQ:DATA:MEM?
The number of values provided is twice of the Record Length setting. As an alternative, only a part of acquisition data can be accessed with the command TRAC:IQ:DATA:MEM? x,y
It’s recommended to set the instrument to single acquisition mode to make sure all data in acquisition memory belong to the latest capture.
By default the instrument sends IQ data in block format: III…QQQ… → TRAC:IQ:DATA:FORM IQBL
Depending on data processing or programming, it might be more comfortable to switch to IQPair format, which provides interleaved data: IQIQIQ… → TRAC:IQ:DATA:FORM IQP
Conversion example: