EasyManuals Logo

Keysight Technologies X Series Programming Guide

Keysight Technologies X Series
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 #373 background imageLoading...
Page #373 background image
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 373
Creating and Downloading User–Data Files
Save and Recall Instrument State Files
// Advance to next match in catalog string
m = m.NextMatch();
}
}
/* This method writes an ASCII text string (SCPI command) to the
signal generator.
If the bool "sendEnd" is true, the END line character will be sent
at the
conclusion of the write. If "sendEnd is false the END line will
not be sent.*/
static public void WriteDevice(uint device, string scpiCmd, bool
sendEnd)
{
byte[] buf = Encoding.ASCII.GetBytes(scpiCmd);
if (!sendEnd) // Do not send the END line character
{
VisaInterop.SetAttribute(device, VisaAttribute.SendEndEnable,
0);
}
uint retCount;
VisaInterop.Write(device, buf, (uint)buf.Length, out retCount);
if (!sendEnd) // Set the bool sendEnd true.
{
VisaInterop.SetAttribute(device, VisaAttribute.SendEndEnable,
1);
}
}
// This method reads an ASCII string from the specified device
static public string ReadDevice(uint device)
{
string retValue = "";
byte[] buf = new byte[MAX_READ_DEVICE_STRING]; // 1024 bytes
maximum read

Table of Contents

Other manuals for Keysight Technologies X Series

Questions and Answers:

Question and Answer IconNeed help?

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

Keysight Technologies X Series Specifications

General IconGeneral
BrandKeysight Technologies
ModelX Series
CategoryMeasuring Instruments
LanguageEnglish

Related product manuals