![Rohde & Schwarz R&S FSV Скачать руководство пользователя страница 184](http://html.mh-extra.com/html/rohde-and-schwarz/rands-fsv/rands-fsv_quick-start-manual_1477866184.webp)
Brief Introduction to Remote Control
R&S
®
FSVA/FSV
161
Quick Start Guide 1321.3066.02 ─ 05
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; "] = "; ststepsize*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 ************************************************************************
7.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.
Detailed Programming Examples
Содержание R&S FSV
Страница 25: ......