Operating instructions

More Complex Programming Examples R&S ESCI
1166.6004.12 7.18 E-1
Frequency Counting
The following example is based on a signal with a level of –30 dBm at 100 MHz. The default setting of
the R&S ESCI can also be used for this measurement (SetupInstrument). The objective of frequency
counting is to determine the exact frequency of the signal at 100 MHz.
REM ************************************************************************
Public Sub MarkerCount()
result$ = Space$(100)
CALL SetupInstrument 'Default setting
'--------- Measure signal frequency with frequency counter -----------------
CALL IBWRT(receiver%,"INIT:CONT OFF") 'Single sweep on
CALL IBWRT(receiver%,"CALC:MARK:PEXC 6DB") 'Peak excursion
CALL IBWRT(receiver%,"CALC:MARK:STAT ON") 'Marker 1 on
CALL IBWRT(receiver%,"CALC:MARK:TRAC 1") 'Assign marker 1 to trace 1
CALL IBWRT(receiver%,"CALC:MARK:X 100MHz") 'Set marker 1 to 100 MHz
CALL IBWRT(receiver%,"CALC:MARK:COUNT:RES 1HZ") 'Frequency counter 1 Hz
CALL IBWRT(receiver%,"CALC:MARK:COUNT ON") 'frequency counter on
CALL IBWRT(receiver%,"INIT;*WAI") 'Perform sweep with sync
CALL IBWRT(receiver%,"CALC:MARK:COUNT:FREQ?") 'Query measured frequency
CALL IBRD(receiver%, result$) 'and read it out
Print "Marker Count Freq: ";result$
END SUB
REM ************************************************************************