Agilent Technologies InfiniiVision 3000 X-Series Programmer's Manual page 1165

Oscilloscopes
Hide thumbs Also See for InfiniiVision 3000 X-Series:
Table of Contents

Advertisement

Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
{
m_IoObject.WriteString(":SYSTem:ERRor?", true);
strInstrumentError = m_IoObject.ReadString();
if (!strInstrumentError.ToString().StartsWith("+0,"))
{
if (bFirstError)
{
Console.WriteLine("ERROR(s) for command '{0}': ",
strCommand);
bFirstError = false;
}
Console.Write(strInstrumentError);
}
} while (!strInstrumentError.ToString().StartsWith("+0,"));
}
private void OpenIo()
{
m_ResourceManager = new ResourceManagerClass();
m_IoObject = new FormattedIO488Class();
// Open the default VISA COM IO object.
try
{
m_IoObject.IO =
(IMessage)m_ResourceManager.Open(m_strVisaAddress,
AccessMode.NO_LOCK, 0, "");
}
catch (Exception e)
{
Console.WriteLine("An error occurred: {0}", e.Message);
}
}
public void SetTimeoutSeconds(int nSeconds)
{
m_IoObject.IO.Timeout = nSeconds * 1000;
}
public void Close()
{
try
{
m_IoObject.IO.Close();
}
catch { }
try
{
Marshal.ReleaseComObject(m_IoObject);
}
catch { }
try
{
Marshal.ReleaseComObject(m_ResourceManager);
Programming Examples
1165
40

Advertisement

Table of Contents
loading

Table of Contents