Programming Examples
R&S
®
ZNB/ZNBT
1218
User Manual 1173.9163.02 ─ 38
mended to define all paths relative to the default directory, to be set via
MMEMory:CDIRectory DEFault
.
// Select default directory, change to sub-directory (relative to default directory)
MMEMory:CDIRectory DEFault
MMEMory:CDIRectory 'Traces'
MMEMory:STORe:TRACe 'Trc1', 'S21.s1p'
MMEMory:LOAD:TRACe 'Trc1', 'S21.s1p'
// Alternative, more compact definition
MMEMory:CDIRectory DEFault
MMEMory:STORe:TRACe 'Trc1', 'Traces\S21.s1p'
You may also read the default path (
MMEMory:CDIRectory?
) and use the external
RC program to build the complete paths.
8.2.2 Trace and Diagram Handling
The following sections provide examples for efficient channel and trace definition and
convenient diagram handling.
8.2.2.1
Assigning Channels, Traces, and Diagrams
The following example is a short version of
Chapter 8.1.2, "Channel, Trace and Dia-
// Reset the analyzer
*RST
:SYSTEM:DISPLAY:UPDATE ON
// Create a new trace for S21 with the name TrcDisp
:CALCULATE1:PARAMETER:SDEFINE "TrcDisp","S21"
// Display the trace in the display area 1
:DISPLAY:WINDOW1:TRACE9:FEED 'TrcDisp'
:DISPLAY:WINDOW1:TRACE9:DELETE
// List the traces, assigned to a certain Channel
// format "<trace name>,<meas param>[,<trace name>,<meas param>...]"
:CALCULATE1:PARAMETER:CATALOG?
// Channel 4 does not exist, a new channel and trace is created
:CALCULATE4:PARAMETER:SDEFINE "Ch4Trc2","S22"
:CALCULATE4:PARAMETER:SDEFINE "Ch4Trc3","S33"
:CALCULATE4:PARAMETER:CATALOG?
Condensed Programming Examples