Remote Spectrum Monitor User Guide : Programming with SCPI : I/Q Capture Block Mode : I/Q Capture Streaming Mode
 
I/Q Capture Streaming Mode
Data Capture to Buffer Memory
In streaming, the I/Q data uses the same frame, extended frame structure as in block mode.
I/Q data is captured to high speed DDR2 SDRAM memory, configured as a ring buffer. The buffer memory is 256 MB (256 x 10242 bytes) and it is divided into 1024 partitions. Each partition is 262,144 bytes, which holds 32,768 I/Q frames. I/Q data fills each partition in sequence. The data stream rate to memory is determined by the selected I/Q bandwidth. When the buffer is full, new I/Q data is stored from the first partition again.
 
Data Transmission to Remote User
When the I/Q is sent out from the memory to the remote user, the data flow rate has to be managed. The simplest way to manage the data flow is to send out one partition and wait for a read command from the remote user before sending another partition. The user may not be able to receive all the partitions if the read command for each partition is delayed due to latency in the CPU, OS, network, and user application. The I/Q data is continuously filling the memory partitions at a rate proportional to the selected I/Q capture bandwidth. If the read command arrives after the start of a partition, that partition is skipped and will not be sent. The next partition will be sent instead.
 
I/Q Streaming Capture via SCPI
SENS:FREQ:CENTER 100 MHz
SENS:FREQ:SPAN 20 MHz
SWEEP:MODE FFT
//Set RBW 30 kHz
BANDWIDTH 30 KHz
//Set Reference Level to -30 dBm
DISP:WIND:TRAC:Y:SCAL:RLEV -30
//Set to single sweep
INIT:CONT OFF
//abort any sweep in progress
:ABORT
 
//Set Capture bandwidth. Not same as RBW.
IQ:BANDWIDTH 20 MHz
 
//Set 16 bit resolution
IQ:BITS 16
 
//streaming block capture
IQ:MODE STREAM
//enable time stamp
SENS:IQ:TIME 1
 
//Start IQ Capture. Triggers streaming capture. Data is continuously saved to DDR2 memory in a ring buffer.
 
MEAS:IQ:CAPT
 
//Use loop to continuously send command to retrieve I/Q data partitions and parse data as it is being received.
 
LOOP BEGIN
//Get most recent I/Q partition from memory.
TRAC:IQ:DATA?
 
//Check if capture is aborted.
STATus:OPERation?
 
//If capture is not aborted, parse data and decode time stamp for the received data
LOOP END
To read the I/Q data, use the TRAC:IQ:DATA? SCPI command. This returns the partition with the most recently captured I/Q data. During streaming, the client has to continuously send TRAC:IQ:DATA? SCPI command to another partition’s I/Q data.
The capture of I/Q data and filling of partitions will continue until it is aborted with the :ABORT command or other commands that change frequency or attenuation settings. To determine if the capture was aborted, check the output of STATus:OPERation?.
The STATus:OPERation? query responds with a integer. Convert this integer to binary.
Bit 9 is set to 1 when the MEAS:IQ:CAPT command is issued.
Bit 9 is set to 0 if the capture is aborted by :ABORT command or other command which invalidates the capture.
Error Conditions: Overpower or Overheat
The I/Q capture will be paused if the instrument detects an overpower or overheat condition. In this situation, any pending TRAC:IQ:DATA? query will immediately return #0 and a device-specific error will be added to the SCPI error queue. When the condition is rectified, the capture will automatically restart. For example, if there was an overpower event, remove the overpower source and close the overpower relay. If there was an overheat event, wait for the instrument to cool down.
Error Condition: Timing Reference Source Change
If the instrument detects any of the four conditions below, a device-specific error will be added to the SCPI error queue. In either block or streaming mode, the instrument will not abort a capture that is already in progress.
1. Loss of GPS
2. Newly acquired GPS lock
3. Disconnect/Connect External Reference
4. Large timing drift during GPS Hi-Accuracy Mode