Skip to content

Trace and Marker Commands

Commands for configuring trace display and marker operations.

Configure trace display settings.

trace <trace_id> [channel] [type] [scale] [refpos]
trace <trace_id> off
ParameterDescriptionRange
trace_idTrace number0-3
channelData channel0=S11, 1=S21
typeDisplay format0-29 (see table)
scaleScale per divisionFloat
refposReference position0-8 (grid lines)
IDTypeUnitDescription
0LOGMAGdBLogarithmic magnitude
1PHASEdegPhase angle
2DELAYsGroup delay
3SMITH-Smith chart
4POLAR-Polar plot
5LINEAR-Linear magnitude
6SWR-Standing wave ratio
7REAL-Real part
8IMAG-Imaginary part
9RohmResistance
10XohmReactance
11ZohmImpedance magnitude
12ZPHASEdegImpedance phase
13GSConductance
14BSSusceptance
15YSAdmittance magnitude
16RpohmParallel resistance
17XpohmParallel reactance
18sCFSeries capacitance
19sLHSeries inductance
20pCFParallel capacitance
21pLHParallel inductance
22Q-Quality factor
23RserohmSeries R (S21)
24XserohmSeries X (S21)
25ZserohmSeries Z (S21)
26RshohmShunt R (S21)
27XshohmShunt X (S21)
28ZshohmShunt Z (S21)
29Qs21-Q factor (S21)
ch> trace 0
0 1 0 1 10.000000 7.000000
ch> trace 0 0 0 10 7
ch> trace 1 1 0 10 7
ch> trace 2 off

With no parameters except trace_id:

<enabled> <channel> <type> <smith_format> <scale> <refpos>

Configure marker settings.

marker <marker_id> [position|on|off]
ParameterDescriptionRange
marker_idMarker number0-7
positionSweep point index or frequency0 to points-1, or Hz
onEnable marker-
offDisable marker-
ch> marker 0
0 50000000
ch> marker 0 50
ch> marker 0 145M
ch> marker 1 on
ch> marker 2 off
<index> <frequency>

Set electrical delay compensation.

edelay [time_ps]
ParameterDescription
time_psElectrical delay in picoseconds
ch> edelay
0.000000
ch> edelay 1000
ch> edelay -500

Electrical delay rotates the phase display to compensate for cable length:

  • Positive values: compensate for cable to DUT
  • Negative values: reverse compensation

For a cable of length L with velocity factor VF:

delay_ps = (L_meters / (VF * c)) * 1e12

Where c = 299792458 m/s


Set S21 measurement offset (typically for through-line loss).

s21offset [offset_dB]
ParameterDescription
offset_dBOffset in dB to add to S21
ch> s21offset
0.000000
ch> s21offset 1.5

Use to compensate for:

  • Cable loss between ports
  • External attenuator values
  • Adapter losses

Configure time domain transformation (requires ENABLE_TRANSFORM_COMMAND).

transform [on|off|impulse|step|bandpass]
transform window [minimum|normal|maximum]
transform velocity [percent]
OperationDescription
onEnable time domain
offDisable time domain
impulseLow pass impulse response
stepLow pass step response
bandpassBandpass mode
WindowSidelobe LevelResolution
minimumBestWorst
normalGoodGood
maximumWorstBest
ch> transform
off impulse minimum 100
ch> transform on
ch> transform impulse
ch> transform window normal
ch> transform velocity 66
ch> transform off
<on/off> <mode> <window> <velocity%>

Configure data smoothing (requires __USE_SMOOTH__).

smooth [factor]
FactorDescription
0Smoothing off
1-8Smoothing factor (higher = more smoothing)
ch> smooth
0
ch> smooth 4

Uses 3-point weighted average applied iteratively:

smoothed[i] = (data[i-1] + 2*data[i] + data[i+1]) / 4

Number of iterations = 2^(factor-1)


To read raw trace data, use the data command:

ch> data 0
0.123456 0.234567
...
ch> data 1
0.012345 0.001234
...

Channel 0 = S11, Channel 1 = S21


Command implementations in main.c:

  • cmd_trace: lines 2600-2670
  • cmd_marker: lines 2672-2720
  • cmd_edelay: lines 2722-2750
  • cmd_s21offset: lines 2752-2780
  • cmd_transform: lines 2782-2850
  • cmd_smooth: lines 2852-2880