EasyManua.ls Logo

Rohde & Schwarz FSV40 - Page 172

Rohde & Schwarz FSV40
199 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
Loading...
Controlling the R&S FSVA/FSV Remotely
R&S
®
FSVA/FSV
157Quick Start Guide 1321.3066.02 ─ 06
'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 ************************************************************************
8.3.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.
Storing Instrument Settings
In the following example, the settings/measured data to be stored are defined ini-
tially, in which case only the hardware settings are stored. However, the selection
commands for the other settings are specified with the state "OFF" for the sake of
completeness.
REM ***********************************************************************
Public Sub StoreSettings()
'This subroutine selects the settings to be stored and creates the
'data record "TEST1" in the directory C:\R_S\Instr\user. It uses the default
'setting and resets the instrument after the setting is stored.
'--------- Default settings of the R&S FSV ------------------------------
CALL SetupInstrument
CALL InstrWrite(analyzer,"INIT:CONT OFF")
'Change to single sweep
CALL InstrWrite(analyzer,"INIT;*WAI") 'Perform sweep with sync
Brief Introduction to Remote Control

Table of Contents

Related product manuals