Programming examples
R&S
®
ZNA
1602
User Manual 1178.6462.02 ─ 20
8.2.2.2
Memory traces
The following example shows how to save data to memory and work with memory
traces.
// Reset the analyzer
*RST
:SYSTEM:DISPLAY:UPDATE ON
:SENSE1:SWEEP:POINTS 20
// Create memory trace of the "active" trace (active for the parser !)
// the name of the created memory trace is "Mem2[Trc1]"
:TRACE:COPY MDATA2,CH1DATA
:SENSE1:FUNCTION:ON 'XFREQUENCY:POWER:S11'
:CALCULATE1:PARAMETER:CATALOG?
// Assign the memory trace to a window = diagram, diagram 1 always exists
:DISPLAY:WINDOW1:TRACE2:FEED 'Mem2[Trc1]'
// Create further memory traces and assign them to a window
:TRACE:COPY 'Mem3x[Trc1]',CH1DATA // mixed parameters String, Char
:DISPLAY:WINDOW1:TRACE3:FEED 'Mem3x[Trc1]'
:TRACE:COPY MDATA4,CH1DATA
:DISPLAY:WINDOW1:TRACE4:FEED 'Mem4[Trc1]'
// Create new normal trace on channel 1, assign it to a window
:CALCULATE1:PARAMETER:SDEFINE "Trc2","S22"
:DISPLAY:WINDOW1:TRACE5:FEED 'Trc2'
:CALCULATE1:PARAMETER:SELECT 'Trc2' // now active for channel 1
:CALCULATE1:PARAMETER:SELECT?
:CALCULATE1:PARAMETER:CATALOG?
// Create memory trace for 'Trc2',
// The memory trace can be assigned to the diagram of the mother trace only
// (diagram 1)
:TRACE:COPY MDATA6,CH1DATA
:DISPLAY:WINDOW1:TRACE6:FEED 'Mem6[Trc2]'
// Create new diagram 2 and new channel and trace
:DISPLAY:WINDOW2:STATE ON
:CALCULATE2:PARAMETER:SDEFINE "Ch2Trc1","S22"
:CALCULATE2:PARAMETER:SELECT 'Ch2Trc1' // now active for channel 2
:SENSE1:SWEEP:POINTS 21
:TRACE:COPY MDATA1,CH2DATA
:DISPLAY:WINDOW2:TRACE7:FEED 'Mem1[Ch2Trc1]'
Condensed programming examples