Quick Start Guide 1302.6163.62 - 04
7.17
R&S ESU
Brief Introduction to Remote Control
Detailed Programming Examples
The procedure is required in the case of programming languages that only support structures
with data types of the same type (arrays) (such as with Visual Basic), because the data types
of the header and data sections are different in binary data.
Note that the function viRead32 is not declared in VISA32.BAS and therefore needs to be
defined separately:
Declare Function viRead32 Lib "Visa32" Alias "viRead" (ByVal vi As
Long, Values As Any, ByVal count As Long, retCount As Long) As Long
REM ************************************************************************
Public Sub ReadTrace()
Dim status As ViStatus
Dim retCnt As Long
REM ------ Creating variables ---------------------------------------------
Dim traceData(1250) As Single
'Buffer for floating point binary data
Dim digits As Byte
'Number of characters in length specification
Dim traceBytes As Integer
'Len. of trace data in bytes
Dim traceValues As Integer
'No. of meas. values in buff.
asciiResult$ = Space$(25000)
'Buffer for ASCII trace data
result$ = Space$(100)
'Buffer for simple results
startFreq$ = Space$(100)
'Buffer for start frequency
span$ = Space$(100)
'Buffer for span
REM ------ Default setting of the R&S ESU ---------------------------------
Call SetupInstrument
'Default setting
status = viWrite(analyzer, "INIT:CONT OFF", 13, retCnt) 'Switch to single sweep
status = viWrite(analyzer, "INIT;*WAI", 9, retCnt)
'Perform sweep with sync
REM ------ Defining the frequency range for output ------------------------
status = viWrite(analyzer, "FREQ:STARt?", 11, retCnt)
'Read start frequency
status = viRead(analyzer, startFreq$, 100, retCnt)
startFreq = Val(startFreq$)
status = viWrite(analyzer, "FREQ:SPAN?", 10, retCnt)
'Read span
status = viRead(analyzer, span$, 100, retCnt)
span = Val(span$)
REM ------ Reading out in binary format ------------------------------------
status = viWrite(analyzer, "FORMAT REAL,32", 14, retCnt)
'Set binary format
status = viWrite(analyzer, "TRAC1? TRACE1", 13, retCnt)
'Read trace 1
status = viRead(analyzer, result$, 2, retCnt)
'Read and store length spec. for number of
digits = Val(Mid$(result$, 2, 1))'characters
result$ = Space$(100)
'Reinitialize buffer
status = viRead(analyzer, result$, digits, retCnt)
'Read and store length specification
The arrays for the measured data are dimensioned in such a way that
they provide sufficient space for trace data of the R&S ESU (625
measurement points).
Содержание 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 ...