S331E, S332E, S361E, S362E Site Master™MS2711E, MS2712E, MS2713E Spectrum Master™MT8212E, MT8213E Cell 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 TRACE1,TRACE2|TRACE3
Title
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, A->B on the front panel. This store 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, A->C on the front panel. This store Trace A into Trace C and turns on Trace C if it was off.
Parameter
TRACE1,TRACE2|TRACE3
Parameter Type
<char>
Example
To copy Trace A to Trace B:
:TRACe:COPY TRACE1,TRACE2
To copy Trace A to Trace C:
:TRACe:COPY TRACE1,Trace3
:TRACe:EXCHange TRACE2,TRACE3
Title
Trace Exchange
Description
Swaps Trace B and Trace C.
Parameter
TRACE2,TRACE3
Parameter Type
<char>
Front Panel Access
Shift‑5 (Trace), Trace B Operations, B<->C
Shift‑5 (Trace), Trace C Operations, B<->C
:TRACe:PREamble? {1|2|3}
Title
Trace Header Transfer
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 looks like #AX, where A is the number of digits in X and X is the number of bytes that follow the header. Parameters are returned in comma-delimited ASCII format. Each parameter is returned as “NAME=VALUE[ UNITS],” Note that the parameters returns depend on the firmware version and that this document does not cover all parameter values returned by the command. Valid parameter names are shown in Spectrum Analyzer Parameter Names.
Parameter
[1]|2|3
Range
1|2|3
:TRACe[:DATA] {1|2|3},(<header><block>)
:TRACe[:DATA]? {1|2|3}
Title
Trace Data Transfer
Description
This command transfers data from the controlling program to the instrument. The query form transfers trace data from the instrument to the controller. Data is transferred to the instrument enclosed in parentheses as (<header><block>) and from the instrument as <header><block>.
The ASCII header specifies the number of data bytes. It looks like #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 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, there is 4 bytes per data point. So, 4 bytes per point * 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 will return a #0 if data is invalid for the active trace.
Parameter
{1|2|3},(<header><block>)
Related Command
:FORMat:DATA
:TRACe[:DATA]:PREamble?
:TRACe{1|2|3}:DISPlay[:STATe] OFF|ON|0|1
:TRACe{1|2|3}:DISPlay[:STATe]?
Title
Trace View State
Description
Specifies whether the specified 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 1 will set the specified trace visible. Setting the value to OFF or 0 will set the specified trace hidden. Note that issuing this command will also set the specified trace as active trace.
Parameter
OFF|ON|0|1
Parameter Type
<boolean>
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{1|2|3}:LOAD:DISPlay[:STATe] OFF|ON|0|1
:TRACe{1|2|3}:LOAD:DISPlay[:STATe]?
Title
Trace View State
Description
Specifies whether the specified recall 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 1 will set the specified trace visible. Setting the value to OFF or 0 will set the specified trace hidden. Note that this command is valid only if there is a trace recalled.
Parameter
OFF|ON|0|1
Parameter Type
<boolean>
Default Value
OFF
Example
To set Trace A to Blank:
:TRACe:LOAD:DISPlay OFF
:TRACe1:LOAD:DISPlay 0
To set Trace B to View:
:TRACe2:LOAD:DISPlay ON
:TRACe2:LOAD:DISPlay:STATe ON
:TRACe2:LOAd:DISPlay 1
Front Panel Access
Shift‑5, Trace [A/B/C], View Blank
Note 
These SCPI commands are applicable only if the user selects the option to recall the trace to Trace A and not show the live trace.
:TRACe{1|2|3}:WRITe[:STATe] OFF|ON|0|1
:TRACe{1|2|3}:WRITe[:STATe]?
Title
Trace Write State
Description
Specifies whether the specified trace state should be set to write or hold. TRACe1 corresponds to Trace A, TRACe2 corresponds to Trace B, and TRACe3 corresponds to Trace C. Setting the state to ON or 1 will set the specified trace to write. Setting the state to OFF or 0 will set the specified trace to hold.
Parameter
OFF|ON|0|1
Parameter Type
<boolean>
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 OR :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
:TRACe1:OPERation NORMal|MAXHold|MINHold|AVERage
:TRACe1:OPERation?
Title
Trace A 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 the Shift‑5 (Trace), Trace A Operations, Normal->A on the front panel. This displays a trace based on the detection method selected.
Setting the operation to MAXHold is equivalent to pressing the Shift‑5 (Trace), Trace A Operations, Max Hold->A 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 the Shift‑5 (Trace), Trace A Operations, Min Hold->A 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 the Shift‑5 (Trace), Trace A Operations, Average->A 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.
Parameter
NORMal|MAXHold|MINHold|AVERage
Parameter Type
<char>
Default Value
NORMal
Related Command
[:SENSe]:AVERage:TYPE
:TRACe2:OPERation MAXHold|MINHold
:TRACe2:OPERation?
Title
Trace B 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 the Shift‑5 (Trace), Trace B Operations, Max Hold->B 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 the Shift‑5 (Trace), Trace B Operations, Min Hold->B 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.
Parameter
MAXHold|MINHold
Parameter Type
<char>
Default Value
None
Range
MAXHold|MINHold
:TRACe3:OPERation MAXHold|MINHold|A-B|B-A
:TRACe3:OPERation?
Title
Trace C 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 the Shift‑5 (Trace), Trace C Operations, Max Hold->C 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 the Shift‑5 (Trace), Trace C Operations, Min Hold->C 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 the Shift‑5 (Trace), Trace C Operations, A-B->C. This displays the difference between trace A and trace B values in trace C.
Setting the operation to B-A is equivalent to pressing the Shift‑5 (Trace), Trace C Operations, B-A->C. 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.
Parameter
MAXHold|MINHold|A-B|B-A
Parameter Type
<char>
Default Value
None
Range
MAXHold|MINHold|A-B|B-A