Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1114

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

Advertisement

39
Programming Examples
1114
// 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".
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide

Advertisement

Table of Contents
loading

Table of Contents