306 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
Dim rm As VisaComLib.ResourceManager
Set rm = New AgilentRMLib.SRMCls
Dim SigGen As VisaComLib.FormattedIO488
Set SigGen = New VisaComLib.FormattedIO488
' NOTE: Use the IP address of your signal generator in the rm.Open
declaration
Set SigGen.IO = rm.Open("TCPIP0::000.000.000.000")
Dim data As Byte
Dim iq_data() As Byte
Dim FileHandle As Integer
Dim numPoints As Integer
Dim index As Integer
Dim Header As String
Dim response As String
Dim hiByte As String
Dim loByte As String
Dim strFilename As String
strFilename = "C:\IQ_DataVB" ‘File Name and location on PC
'Data will be saved to the signal
generator’s NVWFM ‘/USER/WAVEFORM/IQ_DataVB
directory.
FileHandle = FreeFile()
On Error GoTo errorhandler
With SigGen 'Set up the signal generator to accept a
download
.IO.Timeout = 5000 'Timeout 50 seconds
.WriteString "*RST" 'Reset the signal generator.
End With
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...