Trace and Marker Commands
Commands for configuring trace display and marker operations.
Configure trace display settings.
Syntax
Section titled “Syntax”trace <trace_id> [channel] [type] [scale] [refpos]trace <trace_id> offParameters
Section titled “Parameters”| Parameter | Description | Range |
|---|---|---|
trace_id | Trace number | 0-3 |
channel | Data channel | 0=S11, 1=S21 |
type | Display format | 0-29 (see table) |
scale | Scale per division | Float |
refpos | Reference position | 0-8 (grid lines) |
Trace Types
Section titled “Trace Types”| ID | Type | Unit | Description |
|---|---|---|---|
| 0 | LOGMAG | dB | Logarithmic magnitude |
| 1 | PHASE | deg | Phase angle |
| 2 | DELAY | s | Group delay |
| 3 | SMITH | - | Smith chart |
| 4 | POLAR | - | Polar plot |
| 5 | LINEAR | - | Linear magnitude |
| 6 | SWR | - | Standing wave ratio |
| 7 | REAL | - | Real part |
| 8 | IMAG | - | Imaginary part |
| 9 | R | ohm | Resistance |
| 10 | X | ohm | Reactance |
| 11 | Z | ohm | Impedance magnitude |
| 12 | ZPHASE | deg | Impedance phase |
| 13 | G | S | Conductance |
| 14 | B | S | Susceptance |
| 15 | Y | S | Admittance magnitude |
| 16 | Rp | ohm | Parallel resistance |
| 17 | Xp | ohm | Parallel reactance |
| 18 | sC | F | Series capacitance |
| 19 | sL | H | Series inductance |
| 20 | pC | F | Parallel capacitance |
| 21 | pL | H | Parallel inductance |
| 22 | Q | - | Quality factor |
| 23 | Rser | ohm | Series R (S21) |
| 24 | Xser | ohm | Series X (S21) |
| 25 | Zser | ohm | Series Z (S21) |
| 26 | Rsh | ohm | Shunt R (S21) |
| 27 | Xsh | ohm | Shunt X (S21) |
| 28 | Zsh | ohm | Shunt Z (S21) |
| 29 | Qs21 | - | Q factor (S21) |
Examples
Section titled “Examples”ch> trace 00 1 0 1 10.000000 7.000000
ch> trace 0 0 0 10 7ch> trace 1 1 0 10 7ch> trace 2 offOutput Format
Section titled “Output Format”With no parameters except trace_id:
<enabled> <channel> <type> <smith_format> <scale> <refpos>marker
Section titled “marker”Configure marker settings.
Syntax
Section titled “Syntax”marker <marker_id> [position|on|off]Parameters
Section titled “Parameters”| Parameter | Description | Range |
|---|---|---|
marker_id | Marker number | 0-7 |
position | Sweep point index or frequency | 0 to points-1, or Hz |
on | Enable marker | - |
off | Disable marker | - |
Examples
Section titled “Examples”ch> marker 00 50000000
ch> marker 0 50ch> marker 0 145Mch> marker 1 onch> marker 2 offOutput Format
Section titled “Output Format”<index> <frequency>edelay
Section titled “edelay”Set electrical delay compensation.
Syntax
Section titled “Syntax”edelay [time_ps]Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
time_ps | Electrical delay in picoseconds |
Examples
Section titled “Examples”ch> edelay0.000000
ch> edelay 1000ch> edelay -500Electrical delay rotates the phase display to compensate for cable length:
- Positive values: compensate for cable to DUT
- Negative values: reverse compensation
Calculation
Section titled “Calculation”For a cable of length L with velocity factor VF:
delay_ps = (L_meters / (VF * c)) * 1e12Where c = 299792458 m/s
s21offset
Section titled “s21offset”Set S21 measurement offset (typically for through-line loss).
Syntax
Section titled “Syntax”s21offset [offset_dB]Parameters
Section titled “Parameters”| Parameter | Description |
|---|---|
offset_dB | Offset in dB to add to S21 |
Examples
Section titled “Examples”ch> s21offset0.000000
ch> s21offset 1.5Use to compensate for:
- Cable loss between ports
- External attenuator values
- Adapter losses
transform
Section titled “transform”Configure time domain transformation (requires ENABLE_TRANSFORM_COMMAND).
Syntax
Section titled “Syntax”transform [on|off|impulse|step|bandpass]transform window [minimum|normal|maximum]transform velocity [percent]Operations
Section titled “Operations”| Operation | Description |
|---|---|
on | Enable time domain |
off | Disable time domain |
impulse | Low pass impulse response |
step | Low pass step response |
bandpass | Bandpass mode |
Window Functions
Section titled “Window Functions”| Window | Sidelobe Level | Resolution |
|---|---|---|
minimum | Best | Worst |
normal | Good | Good |
maximum | Worst | Best |
Examples
Section titled “Examples”ch> transformoff impulse minimum 100
ch> transform onch> transform impulsech> transform window normalch> transform velocity 66ch> transform offOutput Format
Section titled “Output Format”<on/off> <mode> <window> <velocity%>smooth
Section titled “smooth”Configure data smoothing (requires __USE_SMOOTH__).
Syntax
Section titled “Syntax”smooth [factor]Parameters
Section titled “Parameters”| Factor | Description |
|---|---|
| 0 | Smoothing off |
| 1-8 | Smoothing factor (higher = more smoothing) |
Examples
Section titled “Examples”ch> smooth0
ch> smooth 4Algorithm
Section titled “Algorithm”Uses 3-point weighted average applied iteratively:
smoothed[i] = (data[i-1] + 2*data[i] + data[i+1]) / 4Number of iterations = 2^(factor-1)
Trace Data Access
Section titled “Trace Data Access”To read raw trace data, use the data command:
ch> data 00.123456 0.234567...
ch> data 10.012345 0.001234...Channel 0 = S11, Channel 1 = S21
Source Code Reference
Section titled “Source Code Reference”Command implementations in main.c:
cmd_trace: lines 2600-2670cmd_marker: lines 2672-2720cmd_edelay: lines 2722-2750cmd_s21offset: lines 2752-2780cmd_transform: lines 2782-2850cmd_smooth: lines 2852-2880