EasyManua.ls Logo

Agilent Technologies N5183A User Manual

Agilent Technologies N5183A
366 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 #225 background imageLoading...
Page #225 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 215
Creating and Downloading Waveform Files
Creating Waveform Data
2. Save the I/Q data to a text file to review.
The following lines of code export the I and Q data to a text file for validation. After exporting the
data, open the file using Microsoft Excel or a similar spreadsheet program, and verify that the I and
Q data are correct.
3. Interleave the I and Q data, and byte swap if using little endian order.
This step has two sets of code:
Interleaving and byte swapping I and Q data for little endian order
Interleaving I and Q data for big endian order
For more information on byte order, see “Little Endian and Big Endian (Byte Order)” on page 186.
Line Code Description—Saving the I/Q Data to a Text File
12
13
14
15
16
17
18
19
char *ofile = "c:\\temp\\iq.txt";
FILE *outfile = fopen(ofile, "w");
if (outfile==NULL) perror ("Error opening file to write");
for(index=0; index<numsamples; index++)
{
fprintf(outfile, "%d, %d\n", idata[index], qdata[index]);
}
fclose(outfile);
Line Code Description—Saving the I/Q Data to a Text File
12 Set the absolute path of a text file to a character variable. In this example, iq.txt is the file name and *ofile
is the variable name.
For the file path, some operating systems may not use the drive prefix (‘c:’ in this example), or may require
only a single forward slash (/), or both ("/temp/iq.txt")
13 Open the text file in write format.
14 If the text file does not open, print an error message.
15–18 Create a loop that prints the array of generated I and Q data samples to the text file.
19 Close the text file.

Table of Contents

Questions and Answers:

Agilent Technologies N5183A Specifications

General IconGeneral
Amplitude Accuracy±0.5 dB
I/Q ModulationYes
Modulation TypesAM, FM, PM, Pulse, FSK, PSK
Output Impedance50 ohm
Harmonics-30 dBc
Switching Speed (frequency)≤ 900 μs
Power Requirements100 to 240 VAC, 50/60 Hz
Subharmonics-60 dBc

Summary

Using IO Interfaces

Using LAN

Explains LAN interface setup, protocols, and configuration for remote control.

Programming Examples

Using GPIB

Covers GPIB interface setup, examples, and function statements.

LAN Programming Interface Examples

Provides examples for VXI-11, Sockets LAN, and related protocols.

Programming the Status Register System

Accessing Status Register Information

Details methods for monitoring conditions and accessing status information.

Creating and Downloading Waveform Files

Downloading Waveform Data

Details methods for downloading I/Q waveform data from simulation and programming environments.

Loading, Playing, and Verifying a Downloaded Waveform

Provides procedures for loading, playing, and verifying downloaded waveforms.

Creating and Downloading User-Data Files

Pattern RAM (PRAM) Data Downloads (E4438C and E8267D)

Explains how to download PRAM data for real-time Custom and TDMA modulation.

FIR Filter Coefficient Downloads (N5182A, E4438C and E8267D)

Covers downloading FIR filter coefficients for specific models and options.

Save and Recall Instrument State Files

Describes saving and recalling instrument state settings using SCPI commands.

User Flatness Correction Downloads Using C++ and VISA

Details downloading user flatness correction values using C++ and VISA.

Data Transfer Troubleshooting (N5182A, E4438C and E8267D Only)

Provides troubleshooting steps for data transfer issues on specific models.

Related product manuals