R&S ESU
Brief Introduction to Remote Control
Detailed Programming Examples
7.18
Quick Start Guide 1302.6163.62 - 04
traceBytes = Val(Left$(result$, digits))
status = viRead32(analyzer, traceData(0), traceBytes, retCnt)
'Read trace data into buffer
status = viRead(analyzer, result$, 1, retCnt)
'Read in delimiter <NL>
REM ------ 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
Print "Value["; i; "] = "; sta stepsize * i; ", "; traceData(i)
Next i
REM ------ Default setting of the time domain ------------------------------
status = viWrite(analyzer, "FREQ:SPAN 0Hz", 13, retCnt) 'Switch to time domain
status = viWrite(analyzer, "INIT;*WAI", 9, retCnt) 'Perform sweep with sync
REM ------ Reading out in ASCII format -------------------------------------
status = viWrite(analyzer, "FORMAT ASCII", 12, retCnt)
'Set ASCII format
status = viWrite(analyzer, "TRAC1? TRACE1", 13, retCnt) 'Read and output
status = viRead(analyzer, asciiResult$, 25000, retCnt)
Print "Contents of Trace1: ", asciiResult$ 'trace 1
END SUB
REM ************************************************************************
7.2.4 Storing and Loading Instrument Settings
7.2.4.1 Storing Instrument Settings
In the following example, the settings/measured data to be stored are initially defined, 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()
Dim status As ViStatus
Dim retCnt As Long
'This subroutine selects the settings to be stored and creates the
'data record "TEST1" in the directory D:\USER\DATA. It uses the default
'setting and resets the instrument after the setting is stored.
REM ------ Default settings of the R&S ESU ---------------------------------
Call SetupInstrument
status = viWrite(analyzer, "INIT:CONT OFF", 13, retCnt)
'Change to single sweep
status = viWrite(analyzer, "INIT;*WAI", 9, retCnt) 'Perform sweep with sync
REM ------ Selection of settings to be stored ------------------------------
status = viWrite(analyzer, "MMEM:SEL:HWS ON", 15, retCnt)
'Store hardware settings
status = viWrite(analyzer, "MMEM:SEL:TRAC OFF", 17, retCnt)
'Do not store any traces
status = viWrite(analyzer, "MMEM:SEL:LIN:ALL OFF", 20, retCnt)
'Store only the activated limit lines
REM ------ Entering comments -----------------------------------------------
Содержание esu
Страница 1: ...R S ESU EMI Test Receiver Quick Start Guide Quick Start Guide Test Measurement 1302 6163 62 04 ...
Страница 26: ...R S ESU Contents 6 Quick Start Guide 1302 6163 62 04 ...
Страница 28: ......
Страница 32: ...R S ESU 0 4 Quick Start Guide 1302 6163 62 04 ...
Страница 88: ...R S ESU Preparing for Use Operating System Properties 2 38 Quick Start Guide 1302 6163 62 04 ...
Страница 104: ...R S ESU Basic Operation Setting Parameters 4 12 Quick Start Guide 1302 6163 62 04 ...
Страница 175: ...Quick Start Guide 1302 6163 62 04 6 33 R S ESU LAN Interface Manual Operation of the R S ESU with XP Remote Desktop ...
Страница 178: ...R S ESU LAN Interface Manual Operation of the R S ESU with XP Remote Desktop 6 36 Quick Start Guide 1302 6163 62 04 ...
Страница 201: ...Quick Start Guide 1302 6163 62 04 R S ESU Appendix Appendix ...
Страница 202: ...Quick Start Guide 1302 6163 62 04 R S ESU Appendix ...