R&S ESR Series User Manual page 622

Emi test receiver
Table of Contents

Advertisement

®
R&S
ESR
It is assumed that the desired setting is a signal at 100 MHz with a power of -20 dBm.
It is also assumed that the sixth printer out of the available printers that are listed is the
one you want. The printout is first output to the selected printer and then to a file.
REM ***********************************************************************
Public Sub HCopy()
Dim retCount as Long
Dim SRQWaitTimeout As Long
Dim eventType As Long
Dim eventVi As Long
Dim statusSRQ As Long
DIM Devices(100) as string
FOR i = 0 TO 49
Devices$(i) = Space$(50)
NEXT i
'--------- Default setting of the R&S FSV -------------------------------
CALL SetupStatusReg
CALL InstrWrite(analyzer,"*RST")
CALL InstrWrite(analyzer,"INIT:CONT OFF")
'Single sweep mode
CALL InstrWrite(analyzer,"SYST:DISP:UPD ON")
'Screen display on
'--------- Measurement settings ------------------------------------------
CALL InstrWrite(analyzer,"FREQ:CENT 100MHz;SPAN 10MHz")
'Frequency setting
CALL InstrWrite(analyzer,"DISP:TRAC:Y:RLEV -10dBm")
'Reference level
CALL InstrWrite(analyzer,"INIT;*WAI")
'--------- Querying the available output devices -------------------------
CALL InstrWrite(analyzer,"SYST:COMM:PRIN:ENUM:FIRSt?")
'Read out and display first output device
CALL InstrRead(analyzer,Devices$(0), 50, retCount)
Debug.Print "Printer 0: "+Devices$(0)
For i = 1 to 99
CALL InstrWrite(analyzer,"SYST:COMM:PRIN:ENUM:NEXT?")
CALL InstrRead(analyzer,Devices$(i)
IF Left$(Devices$(i),2) = "''" THEN GOTO SelectDevice
Debug.Print "Printer"+Str$(i)+": " Devices$(i)
NEXT i
SelectDevice:
'---- Selection of output device, printer language and output interface ----
CALL InstrWrite(analyzer,"SYST:COMM:PRIN:SEL "+ Devices(6))
'Printer selection #6
CALL InstrWrite(analyzer,"HCOP:DEST 'SYST:COMM:PRIN'")
'Configuration: "Printout to
'printer interface"
CALL InstrWrite(analyzer,"HCOP:DEV:LANG GDI")
User Manual 1175.7068.02 ─ 12
'Configure status register
'Read out next printer name
'Stop at end of list
'Display printer name
Controlling the R&S ESR Remotely
'Create buffer for printer name
'Preallocate buffer for printer name
'Reset instrument
'Perform measurement
Remote Control
619

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents