EasyManua.ls Logo

Keysight Technologies N5172B EXG - Page 372

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
Loading...
372 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading User–Data Files
Save and Recall Instrument State Files
WriteDevice(device, "MEM:DATA \"/USER/STATE/" + m.ToString()
+ "\",",
false); // << on SAME line!
WriteFileBlock(device, fi.Name);
WriteDevice(device, "\n", true);
}
}
}
/* This method reads out all the sequence/register state files from
the signal
generator and stores them in your computer's local directory with a
".STA"
extension */
static public void BackupInstrumentState(uint device)
{
// Get the memory catalog for the state directory
WriteDevice(device, "MEM:CAT:STAT?\n", false);
string catalog = ReadDevice(device);
/* Match the catalog listing for state files which are named
(sequence#)_(register#) e.g. 0_01, 1_01, 2_05*/
Match m = Regex.Match(catalog, "\"(\\d_\\d\\d),");
while (m.Success)
{
// Grab the matched filename from the regular expresssion
string nextFile = m.Groups[1].ToString();
// Retrieve the file and store with a .STA extension
// in the current directory
Console.WriteLine("Retrieving state file: " + nextFile);
WriteDevice(device, "MEM:DATA? \"/USER/STATE/" + nextFile +
"\"\n", true);
ReadFileBlock(device, nextFile + ".STA");
// Clear newline
ReadDevice(device);

Table of Contents

Other manuals for Keysight Technologies N5172B EXG

Related product manuals