Operating instructions

More Complex Programming Examples R&S ESCI
1166.6004.12 7.24 E-1
Limit Lines and Limit Test
The example below shows the definition and use of a new limit line 5 for trace 1 on screen A and trace 2
on screen B with the following characteristics:
Upper limit line
Absolute x axis in the frequency range
5 reference values: 120 MHz / -70 dB, 126 MHz/-40 dB, 127 MHz/-40 dB, 128 MHz/-10 dB,
129 MHz/-40 dB, 130 MHz/-40 dB, 136 MHz / -70 dB
Relative y axis with unit dB
Absolute threshold at -75 dBm
No margin
The signal of the integrated calibration source (128 MHz, -30 dBm) is used to check the limit test.
REM ************************************************************************
Public Sub LimitLine()
result$ = Space$(100)
'--------- R&S ESCI default setting ----------------------------------------
----
CALL SetupInstrument 'Default setting
CALL IBWRT(receiver%,"FREQUENCY:CENTER 128MHz;Span 10MHz")'Span
Call ibwrt(receiver%,"Diag:Serv:Inp Cal;CSO -30dBm") 'Cal signal on
'--------- Definition of limit lines ---------------------------------------
CALL IBWRT(receiver%,"CALC:LIM5:NAME 'TEST1'") 'Define name
CALL IBWRT(receiver%,"CALC:LIM5:COMM 'Upper limit'") 'Define comment
CALL IBWRT(receiver%,"CALC1:LIM5:TRAC 1") 'Assign trace in screen A
CALL IBWRT(receiver%,"CALC2:LIM5:TRAC 2") 'Assign trace in screen B
CALL IBWRT(receiver%,"CALC:LIM5:CONT:DOM FREQ") 'Define x axis range
CALL IBWRT(receiver%,"CALC:LIM5:CONT:MODE ABS") 'Define x axis scaling
CALL IBWRT(receiver%,"CALC:LIM5:UNIT DB") 'Define y axis unit
CALL IBWRT(receiver%,"CALC:LIM5:UPP:MODE REL") 'Define y axis scaling
'--------- Definition of data points and threshold -------------------------
xlimit$ = "CALC:LIM5:CONT 120MHZ,126MHZ,127MHZ,128MHZ,129MHZ,130MHz,136MHz"
CALL IBWRT(receiver%, xlimit$) 'Set values for x axis
CALL IBWRT(receiver%,"CALC:LIM5:UPP –70,-40,-40,-20,-40,-40,-70")
'Set values for y axis
CALL IBWRT(receiver%,"CALC:LIM5:UPP:THR -75DBM") 'Set y threshold (only
'possible for relative
'y axis)
'---------------------------------------------------------------------------
'A margin or an x /y offset can be defined here.
'----------- Activate and evaluate the limit line in screen A -------------
CALL IBWRT(receiver%,"CALC1:LIM5:UPP:STAT ON") 'Activate line 5 in screen A
CALL IBWRT(receiver%,"CALC1:LIM5:STAT ON") 'Activate limit check in
'screen A
CALL IBWRT(receiver%,"INIT;*WAI") 'Perform sweep with sync