Agilent Technologies 2000 X-Series Servisní příručka Strana 816

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 930
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 815
816 Agilent InfiniiVision 2000 X-Series Oscilloscopes Programmer's Guide
38 Programming Examples
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the result number.
double fResult;
fResult = (double)m_IoObject.ReadNumber(
IEEEASCIIType.ASCIIType_R8, true);
// Check for inst errors.
CheckInstrumentErrors(strQuery);
// Return result number.
return fResult;
}
public double[] DoQueryNumbers(string strQuery)
{
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the result numbers.
double[] fResultsArray;
fResultsArray = (double[])m_IoObject.ReadList(
IEEEASCIIType.ASCIIType_R8, ",;");
// Check for inst errors.
CheckInstrumentErrors(strQuery);
// Return result numbers.
return fResultsArray;
}
public byte[] DoQueryIEEEBlock(string strQuery)
{
// Send the query.
m_IoObject.WriteString(strQuery, true);
// Get the results array.
System.Threading.Thread.Sleep(2000); // Delay before reading.
byte[] ResultsArray;
ResultsArray = (byte[])m_IoObject.ReadIEEEBlock(
IEEEBinaryType.BinaryType_UI1, false, true);
// Check for inst errors.
CheckInstrumentErrors(strQuery);
// Return results array.
return ResultsArray;
}
private void CheckInstrumentErrors(string strCommand)
{
// Check for instrument errors.
string strInstrumentError;
bool bFirstError = true;
do // While not "0,No error".
Zobrazit stránku 815
1 2 ... 811 812 813 814 815 816 817 818 819 820 821 ... 929 930

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

Žádné komentáře