EasyManua.ls Logo

Keysight Technologies N5172B EXG - Page 307

Keysight Technologies N5172B EXG
398 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...
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 307
Creating and Downloading Waveform Files
Programming Examples
numPoints = (FileLen(strFilename)) 'Get number of bytes in the
file: 800 bytes
ReDim iq_data(0 To numPoints - 1) 'Dimension the iq_data array
to the
'size of the IQ_DataVB file:
800 bytes
Open strFilename For Binary Access Read As #FileHandle 'Open the
file for binary read
On Error GoTo file_error
For index = 0 To (numPoints - 1) 'Write the IQ_DataVB data to the
iq_data array
Get #FileHandle, index + 1, data '(index+1) is the record
number
iq_data(index) = data
Next index
Close #FileHandle 'Close the file
'Write the command to the Header string. NOTE: syntax
Header = "MEM:DATA ""/USER/WAVEFORM/IQ_DataVB"","
'Now write the data to the signal generator's non-volatile memory
(NVWFM)
SigGen.WriteIEEEBlock Header, iq_data
SigGen.WriteString "*OPC?" 'Wait for the operation to
complete
response = SigGen.ReadString 'Signal generator reponse to
the OPC? query
Call MsgBox("Data downloaded to the signal generator", vbOKOnly,
"Download")
Exit Sub
errorhandler:

Table of Contents

Other manuals for Keysight Technologies N5172B EXG

Related product manuals