Programming examples
R&S
®
ZNA
1605
User Manual 1178.6462.02 ─ 20
:CALCULATE1:MATH:SDEFINE "sin (2 * 2 * Pi * StimVal / 8e9) "
:CALCULATE1:MATH:SDEFINE "cos (2 * 2 * Pi * StimVal / 8e9) "
:CALCULATE1:MATH:SDEFINE "tan (2 * 2 * Pi * StimVal / 8e9) "
:CALCULATE1:MATH:SDEFINE "Min (sin (6 * Pi * StimVal / 8e9),
cos (6 * Pi * StimVal / 8e9))"
:CALCULATE1:MATH:SDEFINE "Max (sin (6 * Pi * StimVal / 8e9),
cos (6 * Pi * StimVal / 8e9))"
:CALCULATE1:MATH:SDEFINE "Trc1 ^ 2"
:CALCULATE1:MATH:SDEFINE "Trc1 + Trc2 + Trc3"
:CALCULATE1:MATH:SDEFINE "(Trc1 + e) * Pi + Mem8[Trc3] + StimVal
+ Min (Trc1, Mem7[Trc1])"
:CALCULATE1:MATH:SDEFINE "tan (5 * 2 * Pi * StimVal / 8e9)"
8.2.2.4
Trace statistics
The following script shows how to create a trace, select an evaluation range and
retrieve statistical results.
// Reset the analyzer
*RST
:SYSTEM:DISPLAY:UPDATE ON
// Create new channel and trace
:CALCULATE2:PARAMETER:SDEFINE 'Trc2', 'S11'
:CALCULATE2:PARAMETER:SELECT 'Trc2'
:DISPLAY:WINDOW2:STATE ON
:DISPLAY:WINDOW2:TRACE1:FEED 'Trc2'
:SENSE1:SWEEP:TIME:AUTO ON
:SENSE2:SWEEP:TIME:AUTO ON
// Search full-span evaluation range, display statistical results
:CALCulate1:STATistics:DOMain:USER 0
:CALCulate2:STATistics:DOMain:USER 0
:CALCULATE1:STATISTICS ON
:CALCULATE2:STATISTICS ON
// Single sweep, global scope
:INITIATE:CONTINUOUS OFF
:INITIATE:IMMEDIATE:SCOPE ALL
:SENSE:SWEEP:COUNT 4
:INITIATE:IMMEDIATE; *WAI
// Calculate statistical results (also possible if info field is switched off)
:CALCULATE1:STATISTICS:RESULT? MEAN
:CALCulate1:STATistics:RESult? ELENgth
:CALCULATE1:STATISTICS:RESULT? ALL
Condensed programming examples