Programming Examples
R&S
®
ZNA
1379
User Manual 1178.6462.02 ─ 12
9.2.1
Path Independent RC Programs
The default directory for R&S
ZNA user data is
C:\Users\Public\Documents\Rohde-Schwarz\ZNA
. Other instruments may use
different default directories. To make remote control programs compatible, it is recom-
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.
9.2.2
Trace and Diagram Handling
The following sections provide examples for efficient channel and trace definition and
convenient diagram handling.
9.2.2.1
Assigning Channels, Traces, and Diagrams
The following example is a short version of
Chapter 9.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?
Condensed Programming Examples