832
Agilent InfiniiVision 7000A Series Oscilloscopes Programmer's Guide
12
Programming Examples
// Check for instrument errors.
CheckForInstrumentErrors(strQuery);
// Return result numbers.
return fResultsArray;
}
public byte[] DoQueryIEEEBlock(string strQuery)
{
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the results array.
byte[] ResultsArray;
ResultsArray = (byte[])m_IoObject.ReadIEEEBlock(
IEEEBinaryType.BinaryType_UI1, false, true);
// Check for instrument errors.
CheckForInstrumentErrors(strQuery);
// Return results array.
return ResultsArray;
}
public void DoCommandIEEEBlock(string strCommand,
byte[] DataArray)
{
// Send the command.
m_IoObject.WriteIEEEBlock(strCommand, DataArray, true);
// Check for instrument errors.
CheckForInstrumentErrors(strCommand);
}
private void CheckForInstrumentErrors(string strCommand)
{
string strInstrumentError;
bool bFirstError = true;
// Repeat until all errors are displayed.
do
{
// Send the ":SYSTem:ERRor?" query, and get the result string.
m_IoObject.WriteString(":SYSTem:ERRor?", true);
strInstrumentError = m_IoObject.ReadString();
// If there is an error, print it.
if (strInstrumentError.ToString() != "+0,\"No error\"\n")
{
if (bFirstError)
{
// Print the command that caused the error.
Console.WriteLine("ERROR(s) for command '{0}': ",
strCommand);
bFirstError = false;
}
Console.Write(strInstrumentError);
Содержание InfiniiVision 7000A Series
Страница 1: ...Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide...
Страница 34: ...34 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 1 What s New...
Страница 44: ...44 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 2 Setting Up...
Страница 58: ...58 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 3 Getting Started...
Страница 652: ...652 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 5 Commands by Subsystem...
Страница 750: ...750 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 8 Error Messages...
Страница 784: ...784 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 10 Synchronizing Acquisitions...
Страница 810: ...810 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide 11 More About Oscilloscope Commands...
Страница 922: ...922 Agilent InfiniiVision 7000A Series Oscilloscopes Programmer s Guide Index...