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 #343 background imageLoading...
Page #343 background image
Agilent N518xA, E8663B, E44x8C, and E82x7D Signal Generators Programming Guide 333
Creating and Downloading User-Data Files
Save and Recall Instrument State Files
NOT appended to the block and END is not sent at the conclusion of the
write.*/
static public void WriteFileBlock(uint device, string fileName)
{
// Make sure that the file exists, otherwise sends a null block
if (File.Exists(fileName))
{
FileStream fs = new FileStream(fileName, FileMode.Open);
// Send the definite block header: #{lengthDataLength}{dataLength}
string fileSize = fs.Length.ToString();
string fileSizeLength = fileSize.Length.ToString();
WriteDevice(device, "#" + fileSizeLength + fileSize, false);
// Don't set END at the end of writes
VisaInterop.SetAttribute(device, VisaAttribute.SendEndEnable, 0);
// Write the file block to the signal generator
byte[] readBuf = new byte[TRANSFER_BLOCK_SIZE];
int numRead = 0;
uint retCount = 0;
while ((numRead = fs.Read(readBuf, 0, TRANSFER_BLOCK_SIZE)) != 0)
{
VisaInterop.Write(device, readBuf, (uint)numRead, out retCount);
}
// Go ahead and set END on writes
VisaInterop.SetAttribute(device, VisaAttribute.SendEndEnable, 1);
// Done with file
fs.Close();
}
else
{
// Send an empty definite block
WriteDevice(device, "#10", false);
}
}
}
// Declaration of VISA device access constants
public enum VisaAccessMode
{
NoLock = 0,
ExclusiveLock = 1,
SharedLock = 2,

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