FAQs from Rohde & Schwarz

I/Q mode data transfer

Question

Receiving the I and Q values via remote control. How are the I and Q values inserted into the data stream?

Answer

Remote reading of I/Q data from the R&S FSV

The description explains the formats of the I/Q data readout in binary mode. The order of the I and Q information in the binary byte stream is specified by transfer format. Three different transfer formats have been specified.

The remote command for specifying the transfer format is

TRACe<n>:IQ:DATA:FORMat <Format>

These three transfer formats are named as follows:

COMPatible -> 512k I data samples, 512k Q data samples, 512k I data ......

IQBLock -> I data block, Q data block

IQPair -> I data sample, Q data sample, I data sample, Q data sample, I data ......

I/Q mode data transfer - FSV

The drawing contains samples (not bytes). Four bytes contain the content of one sample.

In the case of data blocks 512k I data samples is: 512k samples = 512 * 1024 = 524288 samples

In the case of data blocks 512k Q data samples is: 512k samples = 512 * 1024 = 524288 samples

There are two different ways to initiate a data transfer: getting all data at once and getting the data in small quantities.

Getting all data at once: TRACe<n>:IQ:DATA?

Getting all data in small quantities: TRACe<n>:IQ:DATA:MEMory? <OffsetSamples>,<NoOfSamples>

The overall number of data bytes transferred via the interface is as follows:

L = H + s * b * i

L -> overall number of data bytes transferred

H -> length of header information (see header specification at the end of this note)

s -> number of samples

b -> always 4 because four bytes contain the content of one sample

i -> always 2 because one sample represents I data and Q data

Examples:

===================================================================================================

Transfer format: COMPatible

Number of measured samples: 10

Number of bytes to transfer: 10 samples * 4 * 2 + header = 80 bytes + header

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA?

The data stream contains: Header

40 byte I data

40 byte Q data

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA:MEMory? <OffsetSamples>,<NoOfSamples>

TRACe<n>:IQ:DATA:MEMory? 0, 3

The data stream contains: Header

12 byte I data

12 byte Q data

TRACe<n>:IQ:DATA:MEMory? 3, 3

The data stream contains: Header

12 byte I data

12 byte Q data

TRACe<n>:IQ:DATA:MEMory? 6, 3

The data stream contains: Header

12 byte I data

12 byte Q data

TRACe<n>:IQ:DATA:MEMory? 9, 1

The data stream contains: Header

4 byte I data

4 byte Q data

==============================================================

==============================================================

Transfer format: COMPatible

Number of measured samples: 700000

Number of bytes to transfer: 700000 samples * 4 * 2 + header = 5600000 bytes + header

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA?

The data stream contains: Header

2097152 byte I data

2097152 byte Q data

702848 byte I data

702848 byte Q data

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA:MEMory? <OffsetSamples>,<NoOfSamples>

TRACe<n>:IQ:DATA:MEMory? 0, 5000

The data stream contains: Header

20000 byte I data

20000 byte Q data

TRACe<n>:IQ:DATA:MEMory? 5000, 600000

The data stream contains: Header

2097152 byte I data

2097152 byte Q data

302848 byte I data

302848 byte Q data

TRACe<n>:IQ:DATA:MEMory? 605000, 95000

The data stream contains: Header

380000 byte I data

380000 byte Q data

===================================================================================================

===================================================================================================

===================================================================================================

===================================================================================================

Transfer format: IQBLock

Number of measured samples: 10

Number of bytes to transfer: 10 samples * 4 * 2 + header = 80 bytes + header

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA?

The data stream contains: Header

40 byte I data

40 byte Q data

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA:MEMory? <OffsetSamples>,<NoOfSamples>

TRACe<n>:IQ:DATA:MEMory? 0, 3

The data stream contains: Header

12 byte I data

12 byte Q data

TRACe<n>:IQ:DATA:MEMory? 3, 3

The data stream contains: Header

12 byte I data

12 byte Q data

TRACe<n>:IQ:DATA:MEMory? 6, 3

The data stream contains: Header

12 byte I data

12 byte Q data

TRACe<n>:IQ:DATA:MEMory? 9, 1

The data stream contains: Header

4 byte I data

4 byte Q data

==============================================================

==============================================================

Transfer format: IQBLock

Number of measured samples: 700000

Number of bytes to transfer: 700000 samples * 4 * 2 + header = 5600000 bytes + header

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA?

The data stream contains: Header

2800000 byte I data

2800000 byte Q data

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA:MEMory? <OffsetSamples>,<NoOfSamples>

TRACe<n>:IQ:DATA:MEMory? 0, 5000

The data stream contains: Header

20000 byte I data

20000 byte Q data

TRACe<n>:IQ:DATA:MEMory? 5000, 600000

The data stream contains: Header

24000000 byte I data

24000000 byte Q data

TRACe<n>:IQ:DATA:MEMory? 605000, 95000

The data stream contains: Header

380000 byte I data

380000 byte Q data

===================================================================================================

===================================================================================================

===================================================================================================

===================================================================================================

Transfer format: IQPair

Number of measured samples: 10

Number of bytes to transfer: 10 samples * 4 * 2 + header = 80 bytes + header

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA?

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

........

........

4 byte I data

4 byte Q data

Overall, there are 40 byte I data and 40 byte Q data

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA:MEMory? <OffsetSamples>,<NoOfSamples>

TRACe<n>:IQ:DATA:MEMory? 0, 3

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

TRACe<n>:IQ:DATA:MEMory? 3, 3

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

TRACe<n>:IQ:DATA:MEMory? 6, 3

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

TRACe<n>:IQ:DATA:MEMory? 9, 1

The data stream contains: Header

4 byte I data

4 byte Q data

==============================================================

==============================================================

Transfer format: IQPair

Number of measured samples: 700000

Number of bytes to transfer: 700000 samples * 4 * 2 + header = 5600000 bytes + header

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA?

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

......

......

4 byte I data

4 byte Q data

Overall, there are 2800000 byte I data and 2800000 byte Q data

------------------------------------------------------------------------------------------------------------

Using TRACe<n>:IQ:DATA:MEMory? <OffsetSamples>,<NoOfSamples>

TRACe<n>:IQ:DATA:MEMory? 0, 5000

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

......

......

4 byte I data

4 byte Q data

Overall, there are 20000 byte I data and 20000 byte Q data

TRACe<n>:IQ:DATA:MEMory? 5000, 600000

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

......

......

4 byte I data

4 byte Q data

Overall, there are 24000000 byte I data and 24000000 byte Q data

TRACe<n>:IQ:DATA:MEMory? 605000, 95000

The data stream contains: Header

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

4 byte I data

4 byte Q data

......

......

4 byte I data

4 byte Q data

Overall, there are 380000 byte I data and 380000 byte Q data

===================================================================================================

===================================================================================================

===================================================================================================

===================================================================================================

===================================================================================================

Specification of the header of a binary data stream:

#45168xxxxxxxx

The ASCII character # introduces the data block. The next number indicates how many of the following digits describe the length of the data block. In the example, the 4 following digits indicate a length of 5168 bytes. The data bytes follow. During the transmission of these data bytes, all End or other control signs are ignored until all bytes are transmitted.

This format only supports a byte count up to 9 digits for the number of bytes. For more than 999999999 bytes, the following additional format is used.

#(1100000000) xxxxxxxx

Byte length count if put in brackets. In the example, the byte count indicates a length of 1,100,000,000 bytes. The data bytes follow after the closing bracket.