Operating instructions

R&S ESCI Basic Steps of IEC/IEEE-Bus Programming
1166.6004.12 7.5 E-1
Reading Out Instrument Settings
The settings made in the above example are read out using the abbreviated commands.
REM --------- Reading out instrument settings ----------------------------
PUBLIC SUB ReadSettings()
CFfrequency$ = SPACE$(20) 'Provide text variables (20 characters)
CALL IBWRT(receiver%, "FREQ:CENT?") 'Request center frequency
CALL IBRD(receiver%, CFfrequency$) 'Read value
CFspan$ = SPACE$(20) 'Provide text variables (20 characters)
CALL IBWRT(receiver%, "FREQ:SPAN?") 'Query span
CALL IBRD(receiver%, CFspan$) 'Read value
RLevel$ = SPACE$(20) 'Provide text variables (20 characters)
CALL IBWRT(receiver%, "DISP:TRAC:Y:RLEV?")
'Query reference level
CALL IBRD(receiver%, RLevel$) 'Read value
REM ---------------- Display values on the screen -------------------------
PRINT "Center frequency: "; CFfrequency$,
PRINT "Span: "; CFspan$,
PRINT "Reference level: "; RLevel$,
REM*************************************************************************
Positioning Markers and Displaying Values
REM -------------- Examples of marker functions ----------------------------
PUBLIC SUB ReadMarker()
CALL IBWRT(receiver%, "CALC:MARKER ON;MARKER:MAX")
'Activate marker1 and start peak search
MKmark$ = SPACE$(30) 'Provide text variables (30 characters)
CALL IBWRT(receiver%, "CALC:MARK:X?;Y?") 'Query frequency and level
CALL IBRD(receiver%, MKmark$) 'Read value
REM --------------- Display values on the screen --------------------------
PRINT "Center frequency / level "; MKmark$,
REM
***********************************************************************