Technical data
138 Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz
5 Creating and Downloading User-Data Files
VisaInterop.Close(device);// Close the device
}
else
{
Console.WriteLine("Unable to open " + visaOpenString);
}
VisaInterop.Close(defaultRM); // Close the default resource manager
}
else
{
Console.WriteLine("Unable to open the VISA resource manager");
}
}
/* 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 +