This subsystem provides access to the results of a measurement.
Command tree:CALCulate<Chn>
:DATA
:ALL?
:DALL?
:SGRoup?
:NSWeep?
:COUNt?
:FIRSt?
[:LAST]?
:STIMulus?
The trace data is transferred in either ASCII or block data (REAL) format, depending on the FORMat[:DATA] setting. If the block data format is used, it is recommended to select EOI as receive terminator (SYSTem:COMMunicate:GPIB[:SELF]:RTERminator EOI).
Reads the current response values of the active data trace, reads or writes a memory trace, and reads or writes error terms.
<Chn>
Channel number used to identify the active trace. If unspecified the numeric suffix is set to 1.
Parameters
See list of parameters below.
Range [def. unit]
The data format is parameter-dependent; see below. The unit is the default unit of the measured parameter; see CALCulate<Ch>:PARameter:SDEFine.
*RST value
–
<data>
Unformatted trace data in ASCII or block data format, depending on FORMat[:DATA] setting. This parameter is only used for writing memory traces; see example 2 below.
SCPI, Command Types
Confirmed, command (for memory traces or error terms) or query.
Example 1:
*RST; SWE:POIN 20
Create a trace with 20 sweep points, making the created trace the active trace of channel 1 (omitted optional mnemonic SENSe1).
CALC:DATA? FDAT
Query the 20 response values of the created trace. In the FDATa setting, 20 comma-separated ASCII values are returned.
CALC:DATA:STIM?
Query the 20 stimulus values of the created trace. 20 comma-separated ASCII values are returned.
CALC2:PAR:SDEF 'Trc2', 'S11'
Create a second trace in a new channel no. 2.
CALC:DATA:ALL? FDAT
Query the response values of all traces. 40 comma-separated ASCII values are returned.
Example 2: Write memory trace
*RST; SWE:POIN 3
Create a data trace 'Trc1' with 3 sweep points, making the created trace the active trace of channel 1 (omitted optional mnemonic SENSe1).
TRAC:COPY 'MemTrc1','Trc1'; :CALC:PAR:SEL 'MemTrc1'
Copy the data trace to a memory trace and select the memory trace as an active trace.
CALC:DATA SDAT, 1,2, 3,4, 5,6
Write numbers (1,2), (3,4), (5,6) to the memory trace.
CALC:DATA? SDAT
Query the memory trace. The response is 1,2,3,4,5,6.
FORM REAL,32
Change the data format to 4-byte block data.
CALC:DATA SDAT, #224123456789012345678901234
Write 24 bytes (= 4 * 2 * 3 bytes) of data to the memory trace.
The following parameters are related to trace data (see also Data Flow diagram):
FDATa
Formatted trace data, according to the selected trace format (CALCulate<Chn>:FORMat). 1 value per trace point for Cartesian diagrams, 2 values for polar diagrams.
SDATa
Unformatted trace data: Real and imaginary part of each measurement point. 2 values per trace point irrespective of the selected trace format. The trace mathematics is not taken into account. Wave quantities are returned as voltages.
MDATa
Unformatted trace data (see SDATa) after evaluation of the trace mathematics.
TSData
Raw measured values in pulse profile mode, only available for wave quantities and if pulse profile mode is active. The values correspond to the real output values of the A/D converter; acquired at a fixed sampling rate of 1/12.5 ns. The number of values in the returned array is not correlated with the number of sweep points; it is equal to the Optimum No of Points plus a few values at the beginning which the analyzer acquires during the settling time of the IF filter. See also Show Pulse Profile Settings.
The following parameters denote the error terms generated during a calibration:
Error Term
Description
Receive Ports (S-parameter)
SCORr1, ... SCORr12
2-port error terms; see [SENSe<Ch>:]CORRection:DATA.
1 and 2 (S11, S12, S21, S22)
SCORr13
Directivity
3 (S33)
SCORr14
Source match
SCORr15
Reflection tracking
SCORr16
Isolation
3 (S31)
SCORr17
Load match
SCORr18
Transmission tracking
3 (S13)
SCORr19
1 (S13)
SCORr20
SCORr21
SCORr22
3 (S32)
SCORr23
SCORr24
SCORr25
2 (S23)
SCORr26
SCORR27
The error terms are channel-specific; they apply to the active calibration of channel no. <Chn> or to the factory calibration (if no channel calibration is active). For the factory calibration, the query form is allowed only (no change of factory calibration data).
Use the generalized command [SENSe<Ch>:]CORRection:COLLect:CDATa to read or write error terms for arbitrary analyzer ports. For a programming example refer to Saving and Recalling Error Terms.
Reads the current response values of all data and memory traces of the current test setup.
Channel number used to identify the active trace. This suffix is ignored, the commands returns all traces.
Output format for the S-parameter data, see CALCulate<Chn>:DATA.
Device-specific, query only.
Example:
See CALCulate<Chn>:DATA
Reads the current response values of all S-parameter data traces in channel no. <Ch>. If a full n-port system error correction (TOSM, TOM, TRL ...) is active in the referenced channel, the command reads the full nxn S-matrix of the calibrated ports (there is no need to create or display the S-parameter traces). Use CALCulate<Ch>:DATA:CALL:CATalog? to query the available traces.
<Ch>
Channel number.
Suppose that a TOSM calibration for ports 1 and 3 is active in channel no. 1.
:CALCulate:DATA:CALL:CATalog?
Query the traces available for CALCulate<Ch>:DATA:CALL?. The response is 'S11,S13,S31,S33'
CALCulate:DATA:CALL? SDATa
Return the complex response values of all traces. The traces in the catalog list are read one after another: The response array contains n (number of points) pairs of real and imaginary values for S11, followed by n pairs of values for S13, S31, and S33.
Returns all traces which are available for CALCulate<Ch>:DATA:CALL? in channel no. <Ch>.
Response
String parameters with all S-parameter traces in the current channel or in the active system error correction; see example.
See CALCulate:DATA:CALL?
Reads the current response values of all data traces of the current test setup. Use CALCulate<Ch>:DATA:ALL? to query data traces and memory traces.
Channel number used to identify the active trace. This suffix is ignored, the commands returns all data traces.
Analogous to CALCulate<Chn>:DATA:ALL?; see CALCulate<Chn>:DATA.
Reads the current response values of all S-parameters associated to a group of logical ports (S-parameter group). The S-parameter group must be created before using CALCulate<Ch>:PARameter:DEFine:SGRoup.
Channel number of the previously defined S-parameter group.
Device-specific, query only. The order of the returned S-parameters within the S-parameter group is fixed; see example.
See CALCulate<Ch>:PARameter:DEFine:SGRoup
Reads the number of completed sweeps in single sweep mode (INITiate<Ch>:CONTinuous OFF). The trace can be any of the traces acquired during the single sweep cycle.
Channel number used to identify the active trace.
Number of last completed sweep.
1 to sweep count defined via [SENSe<Ch>:]SWEep:COUNt [–]
Device-specific, query only
Example (see also Sweep History):
See CALCulate<Chn>:DATA:NSWeep:FIRSt?
Reads the response values of a trace acquired in single sweep mode (INITiate<Ch>:CONTinuous OFF). The trace can be any of the traces acquired during the single sweep cycle.
Read unformatted sweep data (fixed parameter): Returns the real and imaginary part of each measurement point (2 values per trace point irrespective of the selected trace format). Wave quantities are returned as voltages.
<Forward_Count>
Number of sweep to be read. 1 denotes the first sweep acquired, 2 denotes the second and so forth.
SWE:COUN 10
Define the number of sweeps (10) to be measured in single sweep mode.
INIT:CONT OFF; :INIT;
Activate single sweep mode and start a single sweep sequence in channel no. 1. No synchronization is necessary.
if (CALC:DATA:NSW:COUN? > 4) CALC:DATA:NSW:FIRS? SDAT, 5
Wait until 5 sweeps have been measured, then query the results of the 5th sweep.
Ensure that the single sweep is terminated before using this command, otherwise the results of the trace count will be unpredictable. See example below. Alternatively, use the CALCulate<Chn>:DATA:NSWeep:FIRSt? command.
<Reverse_Count>
Number of sweep to be read. 1 denotes the last sweep acquired, 2 denotes the second-last and so forth.
INIT:CONT OFF; :INIT; *OPC?
Activate single sweep mode and start a single sweep sequence in channel no. 1. Wait until the single sweep sequence is complete.
CALC:DATA:NSW? SDAT,3
Query the results of the 8th sweep.
Reads the stimulus values of the active data or memory trace.
The data is transferred in the data format defined via FORMat[:DATA]. The unit is the default unit of the sweep variable (Hz or dBm or s).
See CALCulate<Chn>:DATA?