EasyManuals Logo
Home>R&S>Receiver>ESR Series

R&S ESR Series User Manual

R&S ESR Series
1126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #138 background imageLoading...
Page #138 background image
Quick Start
R&S
®
ESR
135User Manual 1175.7068.02 ─ 12
CALL InstrWrite(analyzer,"INIT;*WAI") 'Perform sweep with sync
'--------- Defining the frequency range for output -------------------------
CALL InstrWrite(analyzer,"FREQ:STARt?") 'Read start frequency
CALL InstrRead(analyzer,startFreq$, 100, retCount)
startFreq = Val(startFreq$)
CALL InstrWrite(analyzer,"FREQ:SPAN?") 'Read span
CALL InstrRead(analyzer,span$, 100, retCount)
span = Val(span$)
'--------- Reading out in binary format ------------------------------------
CALL InstrWrite(analyzer, "FORMAT REAL,32")
'Set binary format
CALL InstrWrite(analyzer, "TRAC1? TRACE1")
'Read trace 1
CALL InstrRead(analyzer, result$, 2, retCount)
'Read and store length
digits = Val(Mid$(result$, 2, 1)) 'spec. for number of characters
result$ = Space$(100) 'Reinitialize buffer
CALL InstrRead(analyzer, result$, digits, retCount)
'Read and store length
traceBytes = Val(Left$(result$, digits))
'specification
CALL InstrRead(analyzer, BinBuffer, traceBytes, retCount)
'Read trace data into buffer
CopyMemory traceData(0), ByVal BinBuffer, traceBytes
'Copy data into float array
'--------- Outputting binary data as frequency/level pairs -----------------
traceValues = traceBytes/4 'Single precision = 4 bytes
stepsize = span/traceValues 'Calculate frequency step size
For i = 0 To traceValues - 1
Debug.Print "Value["; i; "] = "; startFreq+stepsize*i; ", "; traceData(i)
Next i
'--------- Default setting of zero span ------------------------------------
CALL InstrWrite(analyzer,"FREQ:SPAN 0Hz")
'Switch to zero span
CALL InstrWrite(analyzer,"INIT;*WAI") 'Perform sweep with sync
'--------- Reading out in ASCII format -------------------------------------
CALL InstrWrite(analyzer,"FORMAT ASCII")
'Set ASCII format
CALL InstrWrite(analyzer,"TRAC1? TRACE1")
'Read and output
CALL InstrRead(analyzer, asciiResult$)
Print "Contents of Trace1: ",asciiResult$ 'trace 1
END SUB
REM ************************************************************************
3.6.2.4 Storing and Loading Instrument Settings
Settings and measured data can be stored and loaded. You can define which data set
is loaded when the instrument is preset or started.
Brief Introduction to Remote Control

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the R&S ESR Series and is the answer not in the manual?

R&S ESR Series Specifications

General IconGeneral
BrandR&S
ModelESR Series
CategoryReceiver
LanguageEnglish

Related product manuals