EasyManua.ls Logo

Rohde & Schwarz FSVA - 4.3.11 Reading and Writing Files; 4.3.11.1 Reading a File from the Instrument

Rohde & Schwarz FSVA
1106 pages
Print Icon
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...
Remote Control
R&S
®
FSVA/FSV
1035Operating Manual 1176.7510.02 ─ 09
CALL InstrWrite (analyzer, "FORMAT ASCII") 'Set ASCII format
CALL InstrWrite (analyzer, "TRAC:IQ:DATA?")
'Re-measure and read out
'I/Q data
CALL InstrRead(analyzer, asciiResult$)
CALL InstrWrite (analyzer, "TRAC:IQ:STAT OFF")
'Stop I/Q data aquisition
'mode if no further
'measurements are to be
'done
END SUB
REM ************************************************************************
4.3.11 Reading and Writing Files
4.3.11.1 Reading a File from the Instrument
In the following example, the TEST1.R&S FSVA/FSV.DFL file stored under
C:\R_S\Instr\user is read from the instrument and stored in the controller.
REM ************************************************************************
Public Sub ReadFile()
'--------- Generate variables ----------------------------------------------
Dim digits As Byte 'Number of digits of
'length information
Dim fileBytes As Long 'Length of file with trace data
'in bytes
result$ = Space$(100) 'Buffer for simple results
'--------- Default setting of status register ------------------------------
CALL SetupStatusReg 'Configure status register
'--------- Read out file ---------------------------------------------------
CALL InstrWrite (analyzer, "MMEM:DATA? 'C:\R_S\Instr\user\TEST1.R&S FSV.DFL'")
'Select file
CALL ilrd(analyzer, result$, 2) 'Read and store number of
digits = Val(Mid$(result$, 2, 1)) 'digits of length information
CALL ilrd(analyzer, result$, digits) 'Read and store length
fileBytes = Val(Left$(result$, digits)) 'information
FileBuffer$ = Space$(fileBytes) 'Buffer for file
CALL ilrd(analyzer, FileBuffer, fileBytes)
'Read file into buffer
CALL ilrd(analyzer, result$, 1) 'Read terminator <NL>
'--------- Store file to controller ---------------------------------------
Open "TEST1.R&S FSV.DFL" For Output As #1
Print #1, FileBuffer; '; to avoid linefeed at
'end of file
Close #1
Remote Control – Programming Examples

Table of Contents

Related product manuals