302 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading Waveform Files
Programming Examples
Dim loHex As String
Dim hiHex As String
Dim strSrc As String
Dim numPoints As Integer
Dim FileHandle As Integer
Dim data As Byte
Dim iq_data() As Byte
Dim strFilename As String
strFilename = "C:\IQ_DataVB"
Const SAMPLES = 200 ' Number of sample PAIRS of I and Q integers
for the waveform
AMPLITUDE = 32767 ' Scale the amplitude for full range of the
signal generators
' I/Q modulator DAC
pi = 3.141592
Dim intIQ_Data(0 To 2 * SAMPLES - 1) 'Array for I and Q integers:
400
ReDim iq_data(0 To (4 * SAMPLES - 1)) 'Need MSB and LSB bytes for
each integer value: 800
'Create an integer array of I/Q pairs
For index = 0 To (SAMPLES - 1)
intIQ_Data(2 * index) = CInt(AMPLITUDE * Sin(2 * pi * index
/ SAMPLES))
intIQ_Data(2 * index + 1) = CInt(AMPLITUDE * Cos(2 * pi *
index / SAMPLES))
Next index
'Convert each integer value to a hex string and then write into the
iq_data byte array
'MSB, LSB ordered
For index = 0 To (2 * SAMPLES - 1)
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...