VNA Master™Programming Manual : Spectrum Analyzer Commands : :TRACe Subsystem
 
:TRACe Subsystem
This subsystem contains commands related to the transfer of trace data to and from the instrument.
Trace Copy
:TRACe:COPY
Description
Copies Trace A to either Trace B or Trace C. Copying Trace A to Trace B is equivalent to pressing the Shift‑5 (Trace), Trace B Operations, AB on the front panel. This stores Trace A into Trace B and turns on Trace B if it was off. Copying Trace A to Trace C is equivalent to pressing the Shift‑5 (Trace), Trace C Operations, AC on the front panel. This stores Trace A into Trace C and turns on Trace C if it was off.
Syntax:
:TRACe:COPY TRACE1,TRACE2|TRACE3
Cmd Parameter
<char> TRACE1,TRACE2|TRACE3
Query Response
NA (no query)
Example
To copy Trace A to Trace B:
:TRACe:COPY TRACE1,TRACE2
To copy Trace A to Trace C:
:TRACe:COPY TRACE1,Trace3
Front Panel Access
NA
 
Trace Exchange
:TRACe:EXCHange TRACE2,TRACE3
Description
Swaps Trace B and Trace C.
Syntax:
:TRACe:EXCHange TRACE2,TRACE3
Cmd Parameter
<char> TRACE2,TRACE3
Query Response
NA (no query)
Front Panel Access
Shift‑5 (Trace), Trace B Operations, BC
Shift‑5 (Trace), Trace C Operations, BC
 
Trace Header Transfer
:TRACe:PREamble?
Description
Returns trace header information for the specified trace. Data can be transferred to and from the 3 available display traces. Use the commands in the :MMEMory subsystem to store and recall traces from the instrument memory. The response begins with an ASCII header. The header specifies the number of following bytes. It appears as #AX, where A is the number of digits in X, and X is the number of bytes that follow the header. (Refer to Example Response Format: for an example of the header.)
Parameters are returned in comma‑delimited ASCII format. Each parameter is returned as “NAME=VALUE[UNITS],” Note that the parameters that are returned depend on the firmware version, and that this document does not cover all parameter values that are returned by the command. Refer to Table: Trace Header Parameters  (Sheet 1 of 4) for valid parameter names.
Syntax:
:TRACe:PREamble? {1|2|3}
Cmd Parameter
NA (query only)
Query Response
[1]|2|3
Range
1|2|3
Front Panel Access
NA
 
 
Trace Header Parameters
Table: Trace Header Parameters  (Sheet 1 of 4) describes parameters that can be returned by the :TRACe:PREamble? command.
Trace Header Parameters  (Sheet 1 of 4)
Parameter Name
Description
SN
Instrument serial #
UNIT_NAME
Instrument name
DESCR
Trace name
DATE
Trace date/time
BASE_VER
Base FW version
APP_NAME
Application name
APP_VER
Application FW version
UNITS
Amplitude units
CENTER_FREQ
Center frequency
SPAN
Frequency span
FREQ_STEP
Frequency step size
RBW
Resolution bandwidth
RBW_TYPE
RBW coupling auto/manual
VBW
Video bandwidth
VBW_TYPE
VBW coupling auto/manual
RBW_VBW_RATIO
RBW/VBW ratio
SPAN_RBW_RATIO
Span/RBW ratio
INPUT_ATTEN
Input attenuation
ATTEN_TYPE
Attenuation coupling auto/manual
REFERENCE_LEVEL
Reference level
SCALE
Y‑axis scale
PREAMP_SET
Preamp state
REF_LEVEL_OFFSET
Reference level offset
DETECTION
Detection type
TRACE_AVERAGE
Number of traces to average
SWEEP_TYPE
Single/continuous
CURRENT_SIGNAL
Current signal index
CURRENT_CHANNEL
Current signal channel
TRACE_MODE
Normal/Avg/Max
TRACE_STATUS
TRACE_A_VIEW_NOT_BLANK: 0x0000000000000001
TRACE_A_WRITE_NOT_HOLD: 0x0000000000000002
TRACE_A_DATA_VALID: 0x0000000000000004
TRACE_B_VIEW_NOT_BLANK: 0x0000000000010000
TRACE_B_WRITE_NOT_HOLD: 0x0000000000020000
TRACE_B_DATA_VALID: 0x0000000000040000
TRACE_C_VIEW_NOT_BLANK: 0x0000000100000000
TRACE_C_WRITE_NOT_HOLD: 0x0000000200000000
TRACE_C_DATA_VALID: 0x0000000400000000
TRACE_C_IS_B_MINUS_A_ON: 0x0000001000000000
TRACE_C_IS_A_MINUS_B_ON: 0x0000002000000000
TRACE_COUNT
Number of traces averaged
UI_DATA_POINTS
Number of display points
IMPEDANCE
Input impedance
REFERENCE_FREQUENCY
Reference freq
SET_SWEEP_TIME
Minimum sweep time setting
TRIGGER_TYPE
Trigger type
VIDEO_TRIGGER_LEVEL
Video trigger level
TRIGGER_POSITION
Trigger position as a percent of the display
PEAK_THRESHOLD
Marker peak search threshold
MARKER_TABLE
Marker table status
ACTIVE_ MEASUREMENT
Current measurement
ANTENNA
Antenna index
OCC_BW_METHOD
Occupied bandwidth method
OCC_BW_PERCENT
Occupied bandwidth % of power setting
OCC_BW_DBC
Occupied bandwidth dBc setting
OCC_BW_MEASURED_ DB
Occupied bandwidth measured dBc value
OCC_BW_MEASURED_ PERCENT
Occupied bandwidth measured % value
OCC_BW_VALUE
Measured occupied bandwidth
OCC_BW_LINE_ MARKER_INFO
Mask off 16 bits at a time to get the display point location of the 3 OBW display indicators
CH_PWR_WIDTH
Channel power integration bandwidth
CH_PWR_VALUE
Measured channel power
CH_PWR_DENSITY
Measured channel power density
CH_PWR_LINE_ MARKER_INFO
Mask off 16 bits at a time to get the display point location of the 2 channel power display indicators
ACPR_MAIN_CH_BW
ACPR main channel bandwidth
ACPR_ADJC_CH_BW
ACPR adjacent channel bandwidth
ACPR_CHANNEL_ SPACING
ACPR channel spacing
ACPR_MAIN_CH_PWR
ACPR measured main channel power
ACPR_UPPER_CH_PWR
ACPR measured upper channel power
ACPR_LOWER_CH_ PWR
ACPR measured lower channel power
ACPR_LOWER_CH_ LINE_MARKER_INFO
Mask off 16 bits at a time to get the display point location of the 2 ACPR lower channel display indicators
ACPR_MAIN_CH_LINE_ MARKER_INFO
Mask off 16 bits at a time to get the display point location of the 2 ACPR main channel display indicators
ACPR_UPPER_CH_ LINE_MARKER_INFO
Mask off 16 bits at a time to get the display point location of the 2 ACPR upper channel display indicators
AM_FM_DEMOD_VOL
AM/FM demod volume
AM_FM_DEMOD_ FREQUENCY
AM/FM demod freq
AM_FM_DEMOD_TYPE
AM/FM demod type
AM_FM_DEMOD_TIME
AM/FM demod time
AM_FM_LINE_ MARKER
Display point location of the demodulation frequency
BEAT_FREQUENCY_ OSC_FREQUENCY
BFO oscillator freq
CI_C_TYPE
C/I measurement carrier type
CI_C_VALUE
C/I measurement measured carrier power
CI_I_BB_VALUE
C/I measurement measured broadband interference power
CI_I_NB_VALUE
C/I measurement measured narrowband interference power
CI_I_WB_VALUE
C/I measurement measured wideband interference power
CI_BB_VALUE
C/I measurement with broadband interference
CI_NB_VALUE
C/I measurement with narrowband interference
CI_WB_VALUE
C/I measurement with wideband interference
MKR_SPA_FREQNx
Marker x frequency (where x is the marker number 0‑11, 0 represent the reference marker #1 and 1 represent delta marker #1, 2 represent reference marker #2, and 3 represent delta marker #2, and so on)
MKR_SPA_POINTx
Reference marker x display point
MKR_SPA_MAGNTx
Reference marker x magnitude
MKR_SPA_PRCNTx
Reference marker x display percentage
MKR_SPA_FLAGSx
Reference marker x flags:
SPA_MKR_FLAG_ON_OFF: 0x00000001
SPA_MKR_FLAG_DELTA_MKR: 0x00000002
SPA_MKR_FLAG_SELECTED: 0x00000004
SPA_MKR_FLAG_DATA_INVALID: 0x00000008
SPA_MKR_FLAG_DATA_STALE: 0x00000010
SPA_MKR_FLAG_FIXED: 0x00000020
SPA_MKR_FLAG_MASK: 0x000000FF
SPA_MKR_FLAG_DISPL_AMPL_HZ: 0x00000100
SPA_MKR_FLAG_DISPL_AMPL_PER_HZ: 0x00000200
SPA_MKR_FLAG_DISP_FLAG: 0x00000F00
SPA_MKR_FLAG_RELATIVE: 0x00001000
SPA_MKR_STANDARD: 0x10000000
SPA_MKR_FIELD_STRENGHT: 0x20000000
SPA_MKR_NOISE: 0x30000000
SPA_MKR_COUNTER: 0x40000000
SPA_MKR_TIME: 0x50000000
MKR_SPA_REF_TOx
Specifies which marker is the marker x reference to
MKR_SPA_TRACex
Specifies which trace the marker x is for.
LIM_LFLAGS_UP
Upper limit flags:
LIMIT_FLAG_ON: 0x00000004
LIMIT_FLAG_ALARM_ON: 0x00000002
LIM_FREQNC_UPx
Upper limit point x freq (where x is the limit point number starting with 0)
LIM_MAGNTD_UPx
Upper limit point x amplitude
LIM_LFLAGS_LO
Lower limit flags:
LIMIT_FLAG_ON: 0x00000004
LIMIT_FLAG_ALARM_ON: 0x00000002
LIM_FREQNC_LOx
Lower limit point x freq (where x is the limit point number starting with 0)
LIM_MAGNTD_LOx
Lower limit point x amplitude
 
Trace Data Transfer
:TRACe[:DATA]
Description
This command transfers data from the controlling program to the instrument. The query form transfers trace data from the instrument to the controller. When transferred to the instrument, data is enclosed in parentheses as (<header><block>), and when transferred from the instrument, data is formatted as <header><block>.
The ASCII header specifies the number of data bytes. It appears as #AX, where A is the number of digits in X, and X is the number of bytes in the <block>.
The format of the block data in the query form is specified by :FORMat:DATA. The block data in the command form is always sent in ASCII format. Data can be transferred to and from the 3 available display traces. Use the commands in the :MMEMory subsystem to store and recall traces from the instrument memory. The command form does not support setting all trace points to a single value. To do this, send the same value to each point. Trace setup information can be acquired by using :TRACe[:DATA]:PREamble?.
To acquire the data from Trace A in the instrument, send :TRACe[:DATA]? 1. A 551 point trace is returned as #42204<block data>. <block> data could be in either INTeger,32 or REAL,32 format. In both cases, each data point has 4 bytes. So, 4 bytes per point multiplied by 551 data points gives 2204 bytes in <block> data. This example assumes that :FORMat:DATA INTeger,32 or :FORMat:DATA REAL,32 has been sent to the instrument before the query command is sent.
The query command returns a #0 if data is invalid for the active trace.
Syntax:
:TRACe[:DATA] {1|2|3},(<header><block>)
:TRACe[:DATA]? {1|2|3}
Cmd Parameter
{1|2|3},(<header><block>)
Query Response
{1|2|3}
Related Command
:FORMat:DATA
:TRACe[:DATA]:PREamble?
Front Panel Access
NA
 
Trace View State
:TRACe{1|2|3}:DISPlay[:STATe]
Description
Specifies whether the designated trace should be displayable (visible) or hidden. TRACe1 corresponds to Trace A, TRACe2 corresponds to Trace B, and TRACe3 corresponds to Trace C. Setting the value to ON or to 1 sets the designated trace to be visible. Setting the value to OFF or to 0 sets the designated trace to be hidden. Note that issuing this command also sets the specified trace as the active trace.
Syntax:
:TRACe{1|2|3}:DISPlay[:STATe] OFF|ON|0|1
:TRACe{1|2|3}:DISPlay[:STATe]?
Cmd Parameter
<boolean> OFF|ON|0|1
Query Response
<bNR1> 0|1
Default Value
ON for Trace A
OFF for Trace B
OFF for Trace C
Example
To set Trace A to Blank:
:TRACe:DISPlay OFF
:TRACe1:DISPlay 0
To set Trace B to View:
:TRACe2:DISPlay ON
:TRACe2:DISPlay:STATe ON
:TRACe2:DISPlay 1
Front Panel Access
Shift‑5 (Trace), View/Blank
 
Trace Write State
:TRACe{1|2|3}:WRITe[:STATe]
Description
Specifies whether the designated trace state should be set to write or to hold. TRACe1 corresponds to Trace A, TRACe2 corresponds to Trace B, and TRACe3 corresponds to Trace C. Setting the state to ON or to 1 sets the specified trace to write. Setting the state to OFF or to 0 sets the specified trace to hold.
Syntax:
:TRACe{1|2|3}:WRITe[:STATe] OFF|ON|0|1
:TRACe{1|2|3}:WRITe[:STATe]?
Cmd Parameter
<boolean> OFF|ON|0|1
Query Response
<bNR1> 0|1
Default Value
ON for Trace A
OFF for Trace B
OFF for Trace C
Example
To set Trace A to Hold:
:TRACe:WRITe:STATe OFF
:TRACe:WRITe OFF
:TRACe:WRITe 0
To set Trace C to Write:
:TRACe3:WRITe ON
:TRACe3:WRITe:STATe ON
:TRACe3:WRITe 1
Related Command
:TRACe:DATA
Front Panel Access
Shift‑5 (Trace), Write/Hold
 
Trace A Operation
:TRACe1:OPERation
Description
This command specifies how successive traces are combined to produce the resulting display values.
Setting the operation to NORMal is equivalent to pressing Shift‑5 (Trace), Trace A Operations, NormalA on the front panel. This displays a trace based on the detection method selected.
Setting the operation to MAXHold is equivalent to pressing Shift‑5 (Trace), Trace A Operations, Max HoldA on the front panel. This displays the largest signal for each display point over multiple sweeps.
Setting the operation to MINHold is equivalent to pressing Shift‑5 (Trace), Trace A Operations, Min HoldA on the front panel. This displays the smallest signal for each display point over multiple sweeps.
Setting the operation to AVERage is equivalent to pressing Shift‑5 (Trace), Trace A Operations, AverageA on the front panel. This displays the average value of multiple sweeps for each display point.
The query version of the command returns the current operation mode or “NONE” if no operation is set.
Syntax:
:TRACe1:OPERation NORMal|MAXHold|MINHold|AVERage
:TRACe1:OPERation?
Cmd Parameter
<char> NORMal|MAXHold|MINHold|AVERage
Query Response
<char> NORM|MAXH|MINH|AVER
Default Value
NORMal
Related Command
[:SENSe]:AVERage:TYPE
Front Panel Access
Shift‑5 (Trace), Trace A Operations, NormalA
Shift‑5 (Trace), Trace A Operations, Max HoldA
Shift‑5 (Trace), Trace A Operations, Min HoldA
Shift‑5 (Trace), Trace A Operations, AverageA
 
Trace B Operation
:TRACe2:OPERation
Description
This command specifies how successive traces are combined to produce the resulting display values.
Setting the operation to MAXHold is equivalent to pressing Shift‑5 (Trace), Trace B Operations, Max HoldB on the front panel. This displays the largest signal for each display point over multiple sweeps.
Setting the operation to MINHold is equivalent to pressing Shift‑5 (Trace), Trace B Operations, Min HoldB on the front panel. This displays the smallest signal for each display point over multiple sweeps.
The query version of the command returns the current operation mode or “NONE” if no operation is set.
Syntax:
:TRACe2:OPERation MAXHold|MINHold
:TRACe2:OPERation?
Cmd Parameter
<char> MAXHold|MINHold
Query Response
<char> MAXH|MINH
Range
MAXHold|MINHold
Default Value
None
Front Panel Access
Shift‑5 (Trace), Trace B Operations, Max HoldB
Shift‑5 (Trace), Trace B Operations, Min HoldB
 
Trace C Operation
:TRACe3:OPERation
Description
This command specifies how successive traces are combined to produce the resulting display values.
Setting the operation to MAXHold is equivalent to pressing Shift‑5 (Trace), Trace C Operations, Max HoldC on the front panel. This displays the largest signal for each display point over multiple sweeps.
Setting the operation to MINHold is equivalent to pressing Shift‑5 (Trace), Trace C Operations, Min HoldC on the front panel. This displays the smallest signal for each display point over multiple sweeps.
Setting the operation to A‑B is equivalent to pressing Shift‑5 (Trace), Trace C Operations, A‑BC. This displays the difference between Trace A and Trace B values in Trace C.
Setting the operation to B‑A is equivalent to pressing Shift‑5 (Trace), Trace C Operations, B‑AC. This displays the difference between Trace B and Trace A values in Trace C.
The query version of the command returns the current operation mode or “NONE” if no operation is set.
Syntax:
:TRACe3:OPERation MAXHold|MINHold|A‑B|B‑A
:TRACe3:OPERation?
Cmd Parameter
<char> MAXHold|MINHold|A‑B|B‑A
Query Response
<char> MAXH|MINH|A‑B|B‑A
Range
MAXHold|MINHold|A‑B|B‑A
Default Value
None
Front Panel Access
Shift‑5 (Trace), Trace C Operations, Max HoldC
Shift‑5 (Trace), Trace C Operations, Min HoldC
Shift‑5 (Trace), Trace C Operations, A‑BC
Shift‑5 (Trace), Trace C Operations, B‑AC