EasyManua.ls Logo

Agilent Technologies E8257D User Manual

Agilent Technologies E8257D
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 #263 background imageLoading...
Page #263 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 253
Creating and Downloading Waveform Files
Programming Examples
// 0 gives 0 V output
// 32767 gives positive full-scale output
// From these ranges, it appears you should offset the
// data by 8192 and scale it by 4. However, due to the
// interpolators in these products, it is better to scale
// the data by a number less than four. Commonly a good
// choice is 70% of 4 which is 2.8.
// By default, the signal generator scales data to 70%
// If you scale the data here, you may want to change the
// signal generator scaling to 100%
// Also we need to swap the byte order on a little endian
// computer. This code also works for big endian order data
// since it swaps bytes based on the order.
for(index=0; index<numsamples; index++)
{
int iscaled = 2.8*(idata[index]-8192); // shift and scale
int qscaled = 2.8*(qdata[index]-8192); // shift and scale
iqbuffer[index*4] = (iscaled >> 8) & 0xFF; // high byte of i
iqbuffer[index*4+1] = iscaled & 0xFF; // low byte of i
iqbuffer[index*4+2] = (qscaled >> 8) & 0xFF; // high byte of q
iqbuffer[index*4+3] = qscaled & 0xFF; // low byte of q
}
// Open a connection to write to the instrument
INST id=iopen(instOpenString);
if (!id)
{
fprintf(stderr, “iopen failed (%s)\n”, instOpenString);
return -1;
}
// Declare variables which will be used later
int bytesToSend;
char s[20];
char cmd[200];
// The E4438C, E8267C and E8267D accept the E443xB format.
// so we can use this next section on any of these signal generators.
// However the E443xB format only uses 14 bits.
bytesToSend = numsamples*2; // calculate the number of bytes
sprintf(s, “%d”, bytesToSend); // create a string s with that number of bytes

Table of Contents

Other manuals for Agilent Technologies E8257D

Questions and Answers:

Agilent Technologies E8257D Specifications

General IconGeneral
BrandAgilent Technologies
ModelE8257D
CategoryInverter
LanguageEnglish

Summary

Getting Started with Remote Operation

Interfaces

Details various interface types (GPIB, LAN, RS-232, USB) for instrument communication.

IO Libraries and Programming Languages

Covers IO libraries and common programming languages for instrument control.

Using IO Interfaces

Using GPIB

Details GPIB interface for instrument connection and control, including setup and verification.

Using LAN

Explains LAN interface protocols (VXI-11, Sockets, Telnet, FTP) for remote instrument programming.

Programming Examples

Using the Programming Interface Examples

Introduces programming examples for remote control using various interfaces and languages.

GPIB Programming Interface Examples

Provides examples for GPIB programming and instrument control, including interface checks and queries.

LAN Programming Interface Examples

Covers LAN programming examples using VXI-11 and Sockets LAN protocols for instrument control.

Programming the Status Register System

Overview

Provides an overview of the status register system for monitoring signal generator conditions and errors.

Status Register Bit Values

Explains how each bit in a register is represented and how to enable/query bits using SCPI commands.

Accessing Status Register Information

Details methods for monitoring conditions, including polling and service request interrupts.

Status Byte Group

Describes the Status Byte Group, including the Status Byte Register and Service Request Enable Register.

Creating and Downloading Waveform Files

Creating and Downloading User-Data Files

Related product manuals