EasyManuals Logo

Keysight Technologies N5172B EXG Programming Guide

Keysight Technologies N5172B EXG
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 #375 background imageLoading...
Page #375 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 375
Creating and Downloading User–Data Files
Save and Recall Instrument State Files
fs.Write(readBuf, 0, (int)retCount);
bytesRemaining -= retCount;
}
// Done with file
fs.Close();
}
/* The following method writes the contents of the specified file to
the
specified file in the form of a SCPI definite block. A newline is
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)
{

Table of Contents

Other manuals for Keysight Technologies N5172B EXG

Questions and Answers:

Question and Answer IconNeed help?

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

Keysight Technologies N5172B EXG Specifications

General IconGeneral
BrandKeysight Technologies
ModelN5172B EXG
CategoryPortable Generator
LanguageEnglish

Related product manuals