Programming examples
R&S
®
ZNB/ZNBT
1500
User Manual 1173.9163.02 ─ 62
8.2.1
Path-independent remote control programs
The default directory for R&S
ZNB/ZNBT user data is
C:\Users\Public\Documents\Rohde-Schwarz\Vna
. 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.
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 diagram
// 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