EasyManuals Logo

Keysight Technologies N5166B CXG Programming Guide

Keysight Technologies N5166B CXG
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
Page #303 background imageLoading...
Page #303 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 303
Creating and Downloading Waveform Files
Programming Examples
strSrc = Hex(intIQ_Data(index)) 'convert the integer to a hex
value
If Len(strSrc) <> 4 Then
strSrc = String(4 - Len(strSrc), "0") & strSrc 'Convert to
hex format i.e "800F
End If 'Pad with 0's
if needed to get 4
'characters
i.e '0' to "0000"
hiHex = Mid$(strSrc, 1, 2) 'Get the first two hex values
(MSB)
loHex = Mid$(strSrc, 3, 2) 'Get the next two hex values
(LSB)
loByte = CByte("&H" & loHex) 'Convert to byte data type LSB
hiByte = CByte("&H" & hiHex) 'Convert to byte data type MSB
iq_data(2 * index) = hiByte 'MSB into first byte
iq_data(2 * index + 1) = loByte 'LSB into second byte
Next index
'Now write the data to the file
FileHandle = FreeFile() 'Get a file number
numPoints = UBound(iq_data) 'Get the number of bytes in the file
Open strFilename For Binary Access Write As #FileHandle Len =
numPoints + 1
On Error GoTo file_error
For index = 0 To (numPoints)
data = iq_data(index)

Table of Contents

Other manuals for Keysight Technologies N5166B CXG

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies N5166B CXG and is the answer not in the manual?

Keysight Technologies N5166B CXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5166B CXG
CategoryPortable Generator
LanguageEnglish

Related product manuals