EasyManua.ls Logo

Keysight Technologies X Series - Page 371

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
Loading...
Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide 371
Creating and Downloading User–Data Files
Save and Recall Instrument State Files
}
/* This method restores all the sequence/register state files
located in
the local directory (identified by a ".STA" file name
extension)
to the signal generator.*/
static public void RestoreInstrumentState(uint device)
{
DirectoryInfo di = new DirectoryInfo(".");// Instantiate object
class
FileInfo[] rgFiles = di.GetFiles("*.STA"); // Get the state
files
foreach(FileInfo fi in rgFiles)
{
Match m = Regex.Match(fi.Name, @"^(\d)_(\d\d)");
if (m.Success)
{
string sequence = m.Groups[1].ToString();
string register = m.Groups[2].ToString();
Console.WriteLine("Restoring sequence #" + sequence +
", register #" + register);
/* Save the target instrument's current state to the specified
sequence/
register pair. This ensures the index file has an entry for the
specified
sequence/register pair. This workaround will not be necessary in
future
revisions of firmware.*/
WriteDevice(device,"*SAV " + register + ", " + sequence +
"\n",
true); // << on SAME line!
// Overwrite the newly created state file with the state
// file that is being restored.

Table of Contents

Other manuals for Keysight Technologies X Series

Related product manuals