Agilent Technologies InfiniiVision 3000 DSO-X 3054A Servisní příručka Strana 887

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 970
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 886
Programming Examples 37
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide 887
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);
}
catch { }
Zobrazit stránku 886
1 2 ... 882 883 884 885 886 887 888 889 890 891 892 ... 969 970

Komentáře k této Příručce

Žádné komentáře